diff --git a/MySQLdb/connections.py b/MySQLdb/connections.py index a84896e..7ac040b 100644 --- a/MySQLdb/connections.py +++ b/MySQLdb/connections.py @@ -325,10 +325,9 @@ class Connection(_mysql.connection): def warning_count(self): """Return the number of warnings generated from the last query. This is derived from the info() method.""" - from string import atoi info = self.info() if info: - return atoi(info.split()[-1]) + return int(info.split()[-1]) else: return 0