diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-03-13 09:57:46 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-03-13 09:57:46 (GMT) |
commit | 8e628d2342de84e45bef4b944c615948e944913c (patch) | |
tree | cdf99d943da3df160038d2ca96ca772384166fa7 /Lib/logging/config.py | |
parent | 4600f11a0772d826c89ff67643ce04ca3c5b2c38 (diff) | |
download | cpython-8e628d2342de84e45bef4b944c615948e944913c.zip cpython-8e628d2342de84e45bef4b944c615948e944913c.tar.gz cpython-8e628d2342de84e45bef4b944c615948e944913c.tar.bz2 |
Made traceback unconditional, to avoid lock contention problems when logging errors occur in a custom importer (SF path #1158052).
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r-- | Lib/logging/config.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index a5c780f..ea157db 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -1,4 +1,4 @@ -# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved. +# Copyright 2001-2005 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, @@ -27,7 +27,7 @@ Copyright (C) 2001-2004 Vinay Sajip. All Rights Reserved. To use, simply 'import logging' and log away! """ -import sys, logging, logging.handlers, string, socket, struct, os +import sys, logging, logging.handlers, string, socket, struct, os, traceback try: import thread @@ -195,7 +195,6 @@ def fileConfig(fname, defaults=None): for log in existing: root.manager.loggerDict[log].disabled = 1 except: - import traceback ei = sys.exc_info() traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) del ei |