diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-01-08 18:51:46 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2007-01-08 18:51:46 (GMT) |
commit | 2cd79f6b7871c65523153f3d44c8e6f895f415ca (patch) | |
tree | 240ec88a0f6cd0c2fa7ecd38ea7462c72e393f03 | |
parent | c683a87ca6d026e33c07758bf4802c009727b5f2 (diff) | |
download | cpython-2cd79f6b7871c65523153f3d44c8e6f895f415ca.zip cpython-2cd79f6b7871c65523153f3d44c8e6f895f415ca.tar.gz cpython-2cd79f6b7871c65523153f3d44c8e6f895f415ca.tar.bz2 |
Bare except clause removed from LogRecord.__init__. Now, only ValueError, TypeError and AttributeError are trapped.
(SF #411881)
-rw-r--r-- | Lib/logging/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index c727308..797fac6e 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -41,8 +41,8 @@ except ImportError: __author__ = "Vinay Sajip <vinay_sajip@red-dove.com>" __status__ = "production" -__version__ = "0.4.9.9" -__date__ = "06 February 2006" +__version__ = "0.5.0.0" +__date__ = "08 January 2007" #--------------------------------------------------------------------------- # Miscellaneous module data @@ -243,7 +243,7 @@ class LogRecord: try: self.filename = os.path.basename(pathname) self.module = os.path.splitext(self.filename)[0] - except: + except (TypeError, ValueError, AttributeError): self.filename = pathname self.module = "Unknown module" self.exc_info = exc_info |