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 7dc1817

Browse filesBrowse files
committed
Merge pull request #387 from tonal/master
Annotate type and set self.connection to None in MySQLResult.read as …
2 parents dbb16ee + eea29eb commit 7dc1817
Copy full SHA for 7dc1817

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+6
-1
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ __pycache__
77
/.tox
88
/build
99
/pymysql/tests/databases.json
10+
11+
/.idea

‎pymysql/connections.py

Copy file name to clipboardExpand all lines: pymysql/connections.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@ def get_server_info(self):
12671267
class MySQLResult(object):
12681268

12691269
def __init__(self, connection):
1270+
"""
1271+
:type connection: Connection
1272+
"""
12701273
self.connection = connection
12711274
self.affected_rows = None
12721275
self.insert_id = None
@@ -1294,7 +1297,7 @@ def read(self):
12941297
else:
12951298
self._read_result_packet(first_packet)
12961299
finally:
1297-
self.connection = False
1300+
self.connection = None
12981301

12991302
def init_unbuffered_query(self):
13001303
self.unbuffered_active = True

0 commit comments

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