Kaydet (Commit) 814fa0fe authored tarafından Vinay Sajip's avatar Vinay Sajip

Exceptions raised during renaming in rotating file handlers are now passed to…

Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).
üst e928977b
...@@ -131,7 +131,7 @@ class RotatingFileHandler(BaseRotatingHandler): ...@@ -131,7 +131,7 @@ class RotatingFileHandler(BaseRotatingHandler):
except (KeyboardInterrupt, SystemExit): except (KeyboardInterrupt, SystemExit):
raise raise
except: except:
pass self.handleError(record)
#print "%s -> %s" % (self.baseFilename, dfn) #print "%s -> %s" % (self.baseFilename, dfn)
if self.encoding: if self.encoding:
self.stream = codecs.open(self.baseFilename, 'w', self.encoding) self.stream = codecs.open(self.baseFilename, 'w', self.encoding)
...@@ -280,7 +280,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler): ...@@ -280,7 +280,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
except (KeyboardInterrupt, SystemExit): except (KeyboardInterrupt, SystemExit):
raise raise
except: except:
pass self.handleError(record)
if self.backupCount > 0: if self.backupCount > 0:
# find the oldest log file and delete it # find the oldest log file and delete it
s = glob.glob(self.baseFilename + ".20*") s = glob.glob(self.baseFilename + ".20*")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment