From: Vinay Sajip Date: Mon, 16 Jan 2006 09:27:58 +0000 (+0000) Subject: Exceptions raised during renaming in rotating file handlers are now passed to handleE... X-Git-Tag: v2.5a0~810 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=814fa0fe11d11b5f36ae696f7a99732f415d3c41;p=thirdparty%2FPython%2Fcpython.git Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised). --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 9e1bec1c62b2..8e569a765d5c 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*")