comparison MySQLdb/cursors.py @ 70:29b4cfd9af07 MySQLdb

show_warnings was renamed show_warnings (bug 2796727)
author kylev
date Fri, 24 Jul 2009 00:35:20 +0000
parents 98d968f5af11
children c0c00294239b
comparison
equal deleted inserted replaced
69:18e5892a5aed 70:29b4cfd9af07
85 85
86 def _warning_check(self): 86 def _warning_check(self):
87 """Check for warnings, and report via the warnings module.""" 87 """Check for warnings, and report via the warnings module."""
88 from warnings import warn 88 from warnings import warn
89 if self._warnings: 89 if self._warnings:
90 warnings = self._get_db().show_warnings() 90 warnings = self._get_db()._show_warnings()
91 if warnings: 91 if warnings:
92 # This is done in two loops in case 92 # This is done in two loops in case
93 # Warnings are set to raise exceptions. 93 # Warnings are set to raise exceptions.
94 for warning in warnings: 94 for warning in warnings:
95 self.messages.append((self.Warning, warning)) 95 self.messages.append((self.Warning, warning))
105 Returns None if there are no more result sets. 105 Returns None if there are no more result sets.
106 """ 106 """
107 if self._executed: 107 if self._executed:
108 self.fetchall() 108 self.fetchall()
109 del self.messages[:] 109 del self.messages[:]
110 110
111 connection = self._get_db() 111 connection = self._get_db()
112 num_rows = connection.next_result() 112 num_rows = connection.next_result()
113 if num_rows == -1: 113 if num_rows == -1:
114 return None 114 return None
115 self._do_get_result() 115 self._do_get_result()