diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py index f51ceb0..be5538a 100644 --- a/MySQLdb/cursors.py +++ b/MySQLdb/cursors.py @@ -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):