Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 739bc93

Browse filesBrowse files
committed
fix.
1 parent 7a301a2 commit 739bc93
Copy full SHA for 739bc93

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎MySQLdb/connections.py

Copy file name to clipboardExpand all lines: MySQLdb/connections.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def defaulterrorhandler(connection, cursor, errorclass, errorvalue):
3434
connection.messages.append(error)
3535
del cursor
3636
del connection
37+
if isinstance(errorvalue, BaseException):
38+
raise errorvalue
3739
if errorclass is not None:
3840
raise errorclass(errorvalue)
3941
else:

‎MySQLdb/cursors.py

Copy file name to clipboardExpand all lines: MySQLdb/cursors.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ def execute(self, query, args=None):
214214
except (SystemExit, KeyboardInterrupt):
215215
raise
216216
except:
217-
exc, value, tb = sys.exc_info()
218-
del tb
217+
exc, value = sys.exc_info()[:2]
219218
self.messages.append((exc, value))
220219
self.errorhandler(self, exc, value)
221220
self._executed = query
@@ -273,8 +272,7 @@ def executemany(self, query, args):
273272
except (SystemExit, KeyboardInterrupt):
274273
raise
275274
except:
276-
exc, value, tb = sys.exc_info()
277-
del tb
275+
exc, value = sys.exc_info()[:2]
278276
self.errorhandler(self, exc, value)
279277
qs = '\n'.join([query[:p], ',\n'.join(q), query[e:]])
280278
if not PY2:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.