summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/run.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2008-01-23 22:55:26 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2008-01-23 22:55:26 (GMT)
commitf30ba3dd662127e4896c1342894fd83cfbfedb51 (patch)
tree07feccf49a1a3bc199e7b7a3d2310c6ae371b2d8 /Lib/idlelib/run.py
parent6f4ee2d48f8a36314e1d64546a5106180f6907b3 (diff)
downloadcpython-f30ba3dd662127e4896c1342894fd83cfbfedb51.zip
cpython-f30ba3dd662127e4896c1342894fd83cfbfedb51.tar.gz
cpython-f30ba3dd662127e4896c1342894fd83cfbfedb51.tar.bz2
There was an error on exit if no sys.exitfunc was defined. Issue 1647.
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r--Lib/idlelib/run.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 4eb64d6..6e91982 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -206,7 +206,10 @@ def exit():
"""
if no_exitfunc:
- del sys.exitfunc
+ try:
+ del sys.exitfunc
+ except AttributeError:
+ pass
sys.exit(0)
class MyRPCServer(rpc.RPCServer):