diff options
-rw-r--r-- | Lib/idlelib/NEWS.txt | 2 | ||||
-rw-r--r-- | Lib/idlelib/run.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index d931e98..18d2315 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ What's New in IDLE 2.6a1? *Release date: XX-XXX-2008* +- There was an error on exit if no sys.exitfunc was defined. Issue 1647. + - Could not open files in .idlerc directory if latter was hidden on Windows. Issue 1743, Issue 1862. 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): |