summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2008-02-14 04:45:30 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2008-02-14 04:45:30 (GMT)
commit38fd069a73adb81104927aeb13a8919214d18dfa (patch)
treed9e5a904dad61bbdea42680420e97493a74d475b /Lib/idlelib
parent0b45f36c819bdf88eaf0e84d4d3beca3d2db9c39 (diff)
downloadcpython-38fd069a73adb81104927aeb13a8919214d18dfa.zip
cpython-38fd069a73adb81104927aeb13a8919214d18dfa.tar.gz
cpython-38fd069a73adb81104927aeb13a8919214d18dfa.tar.bz2
There was an error on exit if no sys.exitfunc was defined. Issue 1647.
Backport r60227
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/NEWS.txt3
-rw-r--r--Lib/idlelib/run.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 06e4ad4..f8931b3 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -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)
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index ae810c4..5560af8 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -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):