diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2017-01-05 04:17:47 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2017-01-05 04:17:47 (GMT) |
commit | e16265d36797d2929e653a7d49b1a53accdbec59 (patch) | |
tree | 827283309f77888d6ee74d44e4c70b93b5b82b27 /Lib | |
parent | 2a352b667beb1401a4c5d9678cebd604ce1e3113 (diff) | |
download | cpython-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')
-rwxr-xr-x | Lib/idlelib/pyshell.py | 6 |
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 |