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 d768ef0

Browse filesBrowse files
committed
Merge pull request PyMySQL#40 from adamchainz/patch-1
connections.py use int not atoi
2 parents 0aa9a53 + 63a72f5 commit d768ef0
Copy full SHA for d768ef0

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-2
lines changed

‎MySQLdb/connections.py

Copy file name to clipboardExpand all lines: MySQLdb/connections.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ def begin(self):
325325
def warning_count(self):
326326
"""Return the number of warnings generated from the
327327
last query. This is derived from the info() method."""
328-
from string import atoi
329328
info = self.info()
330329
if info:
331-
return atoi(info.split()[-1])
330+
return int(info.split()[-1])
332331
else:
333332
return 0
334333

0 commit comments

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