Fix tkinter regression introduced by the security fix in #16248.
This commit is contained in:
parent
86d53cadda
commit
db4309e19a
|
@ -1722,7 +1722,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'):
|
||||||
|
|
Loading…
Reference in New Issue