diff options
author | Georg Brandl <georg@python.org> | 2010-02-06 22:27:51 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-02-06 22:27:51 (GMT) |
commit | 01e4d57b0f07480e37172a0ca12212b8a31ed6f7 (patch) | |
tree | 89a06b58e46fb74089ef9e4b3dd5bee6d5fe3696 /Lib/logging/__init__.py | |
parent | c4a55fccaba4936458c32f5f3b3913fcf2848b42 (diff) | |
download | cpython-01e4d57b0f07480e37172a0ca12212b8a31ed6f7.zip cpython-01e4d57b0f07480e37172a0ca12212b8a31ed6f7.tar.gz cpython-01e4d57b0f07480e37172a0ca12212b8a31ed6f7.tar.bz2 |
Remove Python 1.x or 2.x compatibility code.
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r-- | Lib/logging/__init__.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 38b6c7e..7becfda 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1559,17 +1559,8 @@ def shutdown(handlerList=_handlerList): #else, swallow #Let's try and shutdown automatically on application exit... -try: - import atexit - atexit.register(shutdown) -except ImportError: # for Python versions < 2.0 - def exithook(status, old_exit=sys.exit): - try: - shutdown() - finally: - old_exit(status) - - sys.exit = exithook +import atexit +atexit.register(shutdown) # Null handler |