mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
Made traceback unconditional, to avoid lock contention problems when logging errors occur in a custom importer (SF path #1158052).
This commit is contained in:
parent
4600f11a07
commit
8e628d2342
1 changed files with 2 additions and 3 deletions
|
@ -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
|
# Permission to use, copy, modify, and distribute this software and its
|
||||||
# documentation for any purpose and without fee is hereby granted,
|
# 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!
|
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:
|
try:
|
||||||
import thread
|
import thread
|
||||||
|
@ -195,7 +195,6 @@ def fileConfig(fname, defaults=None):
|
||||||
for log in existing:
|
for log in existing:
|
||||||
root.manager.loggerDict[log].disabled = 1
|
root.manager.loggerDict[log].disabled = 1
|
||||||
except:
|
except:
|
||||||
import traceback
|
|
||||||
ei = sys.exc_info()
|
ei = sys.exc_info()
|
||||||
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
|
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
|
||||||
del ei
|
del ei
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue