Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8e628d2

Browse files
committed
Made traceback unconditional, to avoid lock contention problems when logging errors occur in a custom importer (SF path #1158052).
1 parent 4600f11 commit 8e628d2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/logging/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved.
1+
# Copyright 2001-2005 by Vinay Sajip. All Rights Reserved.
22
#
33
# Permission to use, copy, modify, and distribute this software and its
44
# documentation for any purpose and without fee is hereby granted,
@@ -27,7 +27,7 @@
2727
To use, simply 'import logging' and log away!
2828
"""
2929

30-
import sys, logging, logging.handlers, string, socket, struct, os
30+
import sys, logging, logging.handlers, string, socket, struct, os, traceback
3131

3232
try:
3333
import thread
@@ -195,7 +195,6 @@ def fileConfig(fname, defaults=None):
195195
for log in existing:
196196
root.manager.loggerDict[log].disabled = 1
197197
except:
198-
import traceback
199198
ei = sys.exc_info()
200199
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
201200
del ei

0 commit comments

Comments
 (0)