mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Merge pull request #42 from tiwilliam/cursor-closed-exception
Raise `ProgrammingError` properly when connection is closed
This commit is contained in:
@@ -163,7 +163,7 @@ class BaseCursor(object):
|
||||
if con is not None:
|
||||
con = con()
|
||||
if con is None:
|
||||
self.errorhandler(self, ProgrammingError, "cursor closed")
|
||||
raise ProgrammingError("cursor closed")
|
||||
return con
|
||||
|
||||
def execute(self, query, args=None):
|
||||
|
||||
Reference in New Issue
Block a user