[Python-checkins] r47121 - python/trunk/Lib/logging/handlers.py
vinay.sajip
python-checkins at python.org
Tue Jun 27 09:34:38 CEST 2006
Author: vinay.sajip
Date: Tue Jun 27 09:34:37 2006
New Revision: 47121
Modified:
python/trunk/Lib/logging/handlers.py
Log:
Removed buggy exception handling in doRollover of rotating file handlers. Exceptions now propagate to caller.
Modified: python/trunk/Lib/logging/handlers.py
==============================================================================
--- python/trunk/Lib/logging/handlers.py (original)
+++ python/trunk/Lib/logging/handlers.py Tue Jun 27 09:34:37 2006
@@ -128,12 +128,7 @@
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 @@
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*")
More information about the Python-checkins
mailing list