mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
This commit is contained in:
parent
e928977b80
commit
814fa0fe11
1 changed files with 2 additions and 2 deletions
|
@ -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*")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue