Skip to content

Commit

Permalink
fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Sep 9, 2014
1 parent 7a301a2 commit 739bc93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions MySQLdb/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def defaulterrorhandler(connection, cursor, errorclass, errorvalue):
connection.messages.append(error)
del cursor
del connection
if isinstance(errorvalue, BaseException):
raise errorvalue
if errorclass is not None:
raise errorclass(errorvalue)
else:
Expand Down
6 changes: 2 additions & 4 deletions MySQLdb/cursors.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ def execute(self, query, args=None):
except (SystemExit, KeyboardInterrupt):
raise
except:
exc, value, tb = sys.exc_info()
del tb
exc, value = sys.exc_info()[:2]
self.messages.append((exc, value))
self.errorhandler(self, exc, value)
self._executed = query
Expand Down Expand Up @@ -273,8 +272,7 @@ def executemany(self, query, args):
except (SystemExit, KeyboardInterrupt):
raise
except:
exc, value, tb = sys.exc_info()
del tb
exc, value = sys.exc_info()[:2]
self.errorhandler(self, exc, value)
qs = '\n'.join([query[:p], ',\n'.join(q), query[e:]])
if not PY2:
Expand Down

0 comments on commit 739bc93

Please sign in to comment.