]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Made traceback unconditional, to avoid lock contention problems when logging errors...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 13 Mar 2005 09:57:46 +0000 (09:57 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 13 Mar 2005 09:57:46 +0000 (09:57 +0000)
Lib/logging/config.py

index a5c780fe5d9494bccd9e13c77695103f6305d097..ea157db5bfc5b7bd08b916667438e5722bfbd8e6 100644 (file)
@@ -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