Skip to content

Commit 1007731

Browse files
author
adustman
committed
Avoid unbound local on exception. Fixes #1686154
1 parent 81dbbc5 commit 1007731

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

MySQLdb/MySQLdb/cursors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def execute(self, query, args=None):
158158
if args is not None:
159159
query = query % db.literal(args)
160160
try:
161+
r = None
161162
r = self._query(query)
162163
except TypeError, m:
163164
if m.args[0] in ("not enough arguments for format string",

0 commit comments

Comments
 (0)