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 641a2eb

Browse filesBrowse files
committed
Merge pull request PyMySQL#42 from tiwilliam/cursor-closed-exception
Raise `ProgrammingError` properly when connection is closed
2 parents d768ef0 + bf470a4 commit 641a2eb
Copy full SHA for 641a2eb

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎MySQLdb/cursors.py

Copy file name to clipboardExpand all lines: MySQLdb/cursors.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def _get_db(self):
163163
if con is not None:
164164
con = con()
165165
if con is None:
166-
self.errorhandler(self, ProgrammingError, "cursor closed")
166+
raise ProgrammingError("cursor closed")
167167
return con
168168

169169
def execute(self, query, args=None):

0 commit comments

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