Commit 6a44f925 authored by Barry Warsaw's avatar Barry Warsaw

Fix UnboundLocalError regression due to previous incorrect fix for

issue 16248.
parent 29f9b218
...@@ -1634,7 +1634,7 @@ class Tk(Misc, Wm): ...@@ -1634,7 +1634,7 @@ class Tk(Misc, Wm):
# ensure that self.tk is always _something_. # ensure that self.tk is always _something_.
self.tk = None self.tk = None
if baseName is None: if baseName is None:
import sys, os import os
baseName = os.path.basename(sys.argv[0]) baseName = os.path.basename(sys.argv[0])
baseName, ext = os.path.splitext(baseName) baseName, ext = os.path.splitext(baseName)
if ext not in ('.py', '.pyc', '.pyo'): if ext not in ('.py', '.pyc', '.pyo'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment