diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 06e4ad44411..f8931b328cc 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 ae810c4ecc7..5560af81a2e 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):