]> granicus.if.org Git - python/commitdiff
Issue #29162: Don't depend on 'from tkinter import *' importing sys.
authorTerry Jan Reedy <tjreedy@udel.edu>
Thu, 5 Jan 2017 04:17:47 +0000 (23:17 -0500)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 5 Jan 2017 04:17:47 +0000 (23:17 -0500)
Fix error in format string.

Lib/idlelib/pyshell.py

index e1eade1eea1021536ea36a71c0ca4db365ffb315..f3ee391ca006fc8b44ef29c7e28540cff5fb500a 100755 (executable)
@@ -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