]> granicus.if.org Git - python/commitdiff
Fix a variable scoping error in an sqlite3 test
authorPetri Lehtinen <petri@digip.org>
Fri, 17 Feb 2012 19:30:55 +0000 (21:30 +0200)
committerPetri Lehtinen <petri@digip.org>
Fri, 17 Feb 2012 19:31:02 +0000 (21:31 +0200)
Closes #11689.

Lib/sqlite3/test/hooks.py
Misc/NEWS

index a6161fac85399699904c1c64ce4edc3c4c5e684e..a92e8387861c023271d9bb15720117432ba1fc57 100644 (file)
@@ -168,6 +168,7 @@ class ProgressTests(unittest.TestCase):
         con = sqlite.connect(":memory:")
         action = 0
         def progress():
+            nonlocal action
             action = 1
             return 0
         con.set_progress_handler(progress, 1)
index 9c6485576b421fc97418b26aa014c8ab0e0bf940..754baab6d631563d955d7c5b6fdc798ed871d0b1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -477,6 +477,8 @@ Tools/Demos
 Tests
 -----
 
+- Issue #11689: Fix a variable scoping error in an sqlite3 test
+
 - Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
 
 - Issue #13725: Fix regrtest to recognize the documented -d flag.