summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-12 20:40:09 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-12 20:40:09 (GMT)
commit7f20263349abf23608fc87aa801a5db72125bfec (patch)
tree3f1911166ec620300a6a50ac27e8c275668e5654 /Lib/lib-tk
parent2f3667a7b92b4ef5d3d3db986b0723cf27706930 (diff)
downloadcpython-7f20263349abf23608fc87aa801a5db72125bfec.zip
cpython-7f20263349abf23608fc87aa801a5db72125bfec.tar.gz
cpython-7f20263349abf23608fc87aa801a5db72125bfec.tar.bz2
Only reference Tkinter._default_root when needed.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/tkSimpleDialog.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py
index c297922..1e7ed46 100644
--- a/Lib/lib-tk/tkSimpleDialog.py
+++ b/Lib/lib-tk/tkSimpleDialog.py
@@ -119,10 +119,9 @@ class _QueryDialog(Dialog):
minvalue = None, maxvalue = None,
parent = None):
- from Tkinter import _default_root
-
if not parent:
- parent = _default_root
+ import Tkinter
+ parent = Tkinter._default_root
self.prompt = prompt
self.minvalue = minvalue