]> granicus.if.org Git - python/commitdiff
There was an error on exit if no sys.exitfunc was defined. Issue 1647.
authorKurt B. Kaiser <kbk@shore.net>
Thu, 14 Feb 2008 04:45:30 +0000 (04:45 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Thu, 14 Feb 2008 04:45:30 +0000 (04:45 +0000)
Backport r60227

Lib/idlelib/NEWS.txt
Lib/idlelib/run.py

index 06e4ad44411cf8ed6c3b50654f756f79da2d5fe1..f8931b328cc8d16725cc46ee86e97ca9019c2c0c 100644 (file)
@@ -3,6 +3,9 @@ What's New in IDLE 1.2.2c1?
 
 *Release date: XX-FEB-2008*
 
+- There was an error on exit if no sys.exitfunc was defined. Issue 1647.
+  (backport r60227)
+
 - Could not open files in .idlerc directory if latter was hidden on Windows.  
   Issue 1743, Issue 1862. (backport r60225, r60745)
 
index ae810c4ecc7c6b39d5ab590a6b5c3bbc8f171077..5560af81a2ee87ff00ae7f6f86eb8461df3fbf1a 100644 (file)
@@ -205,7 +205,10 @@ def exit():
 
     """
     if no_exitfunc:
-        del sys.exitfunc
+        try:
+            del sys.exitfunc
+        except AttributeError:
+            pass
     sys.exit(0)
 
 class MyRPCServer(rpc.RPCServer):