mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
There was an error on exit if no sys.exitfunc was defined. Issue 1647.
Backport r60227
This commit is contained in:
parent
0b45f36c81
commit
38fd069a73
2 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue