summaryrefslogtreecommitdiffstats
path: root/Doc/howto/logging-cookbook.rst
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-02 20:07:26 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-02 20:07:26 (GMT)
commit47395617bc2a6d2188039bf30e637bc203f93aba (patch)
tree0eb85bbca0f7dd25c619186c565f92fd63dfb886 /Doc/howto/logging-cookbook.rst
parentc38c816ea16b37cdc07970474c2a477f216c27ce (diff)
downloadcpython-47395617bc2a6d2188039bf30e637bc203f93aba.zip
cpython-47395617bc2a6d2188039bf30e637bc203f93aba.tar.gz
cpython-47395617bc2a6d2188039bf30e637bc203f93aba.tar.bz2
Issue #16261: fix bare excepts in Doc/
Diffstat (limited to 'Doc/howto/logging-cookbook.rst')
-rw-r--r--Doc/howto/logging-cookbook.rst4
1 files changed, 1 insertions, 3 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index 92af0ec..b336a4a 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -741,9 +741,7 @@ the basis for code meeting your own specific requirements::
break
logger = logging.getLogger(record.name)
logger.handle(record) # No level or filter logic applied - just do it!
- except (KeyboardInterrupt, SystemExit):
- raise
- except:
+ except Exception:
import sys, traceback
print('Whoops! Problem:', file=sys.stderr)
traceback.print_exc(file=sys.stderr)