]> granicus.if.org Git - python/commitdiff
Issue #8716: Fix errors in the non-OS X path of the 27 backport.
authorNed Deily <nad@acm.org>
Mon, 4 Jul 2011 06:16:49 +0000 (23:16 -0700)
committerNed Deily <nad@acm.org>
Mon, 4 Jul 2011 06:16:49 +0000 (23:16 -0700)
Lib/lib-tk/test/runtktests.py

index 041814d0ea8a0318d2f2d36903b67241362ba58f..19769adac72a72c99c9a978c06b5f616721c3099 100644 (file)
@@ -37,9 +37,10 @@ def check_tk_availability():
         if stderr or p.returncode:
             raise unittest.SkipTest("tk cannot be initialized: %s" % stderr)
     else:
+        import Tkinter
         try:
             Tkinter.Button()
-        except tkinter.TclError as msg:
+        except Tkinter.TclError as msg:
             # assuming tk is not available
             raise unittest.SkipTest("tk not available: %s" % msg)