diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2006-01-16 09:27:58 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2006-01-16 09:27:58 (GMT) |
commit | 814fa0fe11d11b5f36ae696f7a99732f415d3c41 (patch) | |
tree | 7d00426e5e2f99b0236dbcfb44d9af52ee74a6a0 /Lib/logging | |
parent | e928977b80de1dbbf8dc31e2af387bd594a7a506 (diff) | |
download | cpython-814fa0fe11d11b5f36ae696f7a99732f415d3c41.zip cpython-814fa0fe11d11b5f36ae696f7a99732f415d3c41.tar.gz cpython-814fa0fe11d11b5f36ae696f7a99732f415d3c41.tar.bz2 |
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/handlers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 9e1bec1..8e569a7 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -131,7 +131,7 @@ class RotatingFileHandler(BaseRotatingHandler): except (KeyboardInterrupt, SystemExit): raise except: - pass + self.handleError(record) #print "%s -> %s" % (self.baseFilename, dfn) if self.encoding: self.stream = codecs.open(self.baseFilename, 'w', self.encoding) @@ -280,7 +280,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler): except (KeyboardInterrupt, SystemExit): raise except: - pass + self.handleError(record) if self.backupCount > 0: # find the oldest log file and delete it s = glob.glob(self.baseFilename + ".20*") |