summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2006-06-27 07:34:37 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2006-06-27 07:34:37 (GMT)
commit6dd59f1632fd174ffdd255acca4b596a69e1a5b4 (patch)
tree4e1feff31492635891fcb566e89463b682dc0049 /Lib/logging
parentc315a0fa40bb2b3c862605eedf92ece4e570a194 (diff)
downloadcpython-6dd59f1632fd174ffdd255acca4b596a69e1a5b4.zip
cpython-6dd59f1632fd174ffdd255acca4b596a69e1a5b4.tar.gz
cpython-6dd59f1632fd174ffdd255acca4b596a69e1a5b4.tar.bz2
Removed buggy exception handling in doRollover of rotating file handlers. Exceptions now propagate to caller.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/handlers.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index e0da254..70bd5d4 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -128,12 +128,7 @@ class RotatingFileHandler(BaseRotatingHandler):
dfn = self.baseFilename + ".1"
if os.path.exists(dfn):
os.remove(dfn)
- try:
- os.rename(self.baseFilename, dfn)
- except (KeyboardInterrupt, SystemExit):
- raise
- except:
- self.handleError(record)
+ os.rename(self.baseFilename, dfn)
#print "%s -> %s" % (self.baseFilename, dfn)
if self.encoding:
self.stream = codecs.open(self.baseFilename, 'w', self.encoding)
@@ -273,12 +268,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler):
dfn = self.baseFilename + "." + time.strftime(self.suffix, timeTuple)
if os.path.exists(dfn):
os.remove(dfn)
- try:
- os.rename(self.baseFilename, dfn)
- except (KeyboardInterrupt, SystemExit):
- raise
- except:
- self.handleError(record)
+ os.rename(self.baseFilename, dfn)
if self.backupCount > 0:
# find the oldest log file and delete it
s = glob.glob(self.baseFilename + ".20*")