diff options
Diffstat (limited to 'Lib/atexit.py')
-rw-r--r-- | Lib/atexit.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/atexit.py b/Lib/atexit.py index bcf7e54..61f2458 100644 --- a/Lib/atexit.py +++ b/Lib/atexit.py @@ -16,9 +16,8 @@ def _run_exitfuncs(): """ while _exithandlers: - func, targs, kargs = _exithandlers[-1] + func, targs, kargs = _exithandlers.pop() apply(func, targs, kargs) - _exithandlers.remove(_exithandlers[-1]) def register(func, *targs, **kargs): """register a function to be executed upon normal program termination |