mirror of
https://github.com/python/cpython.git
synced 2025-12-05 09:03:50 +00:00
Bare except clause removed from LogRecord.__init__. Now, only ValueError, TypeError and AttributeError are trapped.
(SF #411881)
This commit is contained in:
parent
c683a87ca6
commit
2cd79f6b78
1 changed files with 3 additions and 3 deletions
|
|
@ -41,8 +41,8 @@ except ImportError:
|
||||||
|
|
||||||
__author__ = "Vinay Sajip <vinay_sajip@red-dove.com>"
|
__author__ = "Vinay Sajip <vinay_sajip@red-dove.com>"
|
||||||
__status__ = "production"
|
__status__ = "production"
|
||||||
__version__ = "0.4.9.9"
|
__version__ = "0.5.0.0"
|
||||||
__date__ = "06 February 2006"
|
__date__ = "08 January 2007"
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Miscellaneous module data
|
# Miscellaneous module data
|
||||||
|
|
@ -243,7 +243,7 @@ class LogRecord:
|
||||||
try:
|
try:
|
||||||
self.filename = os.path.basename(pathname)
|
self.filename = os.path.basename(pathname)
|
||||||
self.module = os.path.splitext(self.filename)[0]
|
self.module = os.path.splitext(self.filename)[0]
|
||||||
except:
|
except (TypeError, ValueError, AttributeError):
|
||||||
self.filename = pathname
|
self.filename = pathname
|
||||||
self.module = "Unknown module"
|
self.module = "Unknown module"
|
||||||
self.exc_info = exc_info
|
self.exc_info = exc_info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue