summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8>2012-09-07 15:46:30 +0000
committeradustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8>2012-09-07 15:46:30 +0000
commit10077317cd2cb2fb269b5d3ab8de60b02d0aa145 (patch)
treeb5437a95e4dfbe4369af9273817dd8137a63a8aa
parent81dbbc5174996d92c95b8b9b770c3f869ef07ab7 (diff)
downloadmysqldb1-10077317cd2cb2fb269b5d3ab8de60b02d0aa145.tar.gz
Avoid unbound local on exception. Fixes #1686154
-rw-r--r--MySQLdb/MySQLdb/cursors.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/MySQLdb/MySQLdb/cursors.py b/MySQLdb/MySQLdb/cursors.py
index d38cd70..d7dc458 100644
--- a/MySQLdb/MySQLdb/cursors.py
+++ b/MySQLdb/MySQLdb/cursors.py
@@ -158,6 +158,7 @@ class BaseCursor(object):
if args is not None:
query = query % db.literal(args)
try:
+ r = None
r = self._query(query)
except TypeError, m:
if m.args[0] in ("not enough arguments for format string",