summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/pyshell.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2017-01-05 04:17:47 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2017-01-05 04:17:47 (GMT)
commite16265d36797d2929e653a7d49b1a53accdbec59 (patch)
tree827283309f77888d6ee74d44e4c70b93b5b82b27 /Lib/idlelib/pyshell.py
parent2a352b667beb1401a4c5d9678cebd604ce1e3113 (diff)
downloadcpython-e16265d36797d2929e653a7d49b1a53accdbec59.zip
cpython-e16265d36797d2929e653a7d49b1a53accdbec59.tar.gz
cpython-e16265d36797d2929e653a7d49b1a53accdbec59.tar.bz2
Issue #29162: Don't depend on 'from tkinter import *' importing sys.
Fix error in format string.
Diffstat (limited to 'Lib/idlelib/pyshell.py')
-rwxr-xr-xLib/idlelib/pyshell.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py
index e1eade1..f3ee391 100755
--- a/Lib/idlelib/pyshell.py
+++ b/Lib/idlelib/pyshell.py
@@ -5,15 +5,15 @@ try:
except ImportError:
print("** IDLE can't import Tkinter.\n"
"Your Python may not be configured for Tk. **", file=sys.__stderr__)
- sys.exit(1)
+ raise SystemExit(1)
import tkinter.messagebox as tkMessageBox
if TkVersion < 8.5:
root = Tk() # otherwise create root in main
root.withdraw()
tkMessageBox.showerror("Idle Cannot Start",
- "Idle requires tcl/tk 8.5+, not $s." % TkVersion,
+ "Idle requires tcl/tk 8.5+, not %s." % TkVersion,
parent=root)
- sys.exit(1)
+ raise SystemExit(1)
from code import InteractiveInterpreter
import getopt