[Python-checkins] r42069 - python/trunk/Lib/logging/handlers.py

vinay.sajip python-checkins at python.org
Mon Jan 16 10:27:59 CET 2006


Author: vinay.sajip
Date: Mon Jan 16 10:27:58 2006
New Revision: 42069

Modified:
   python/trunk/Lib/logging/handlers.py
Log:
Exceptions raised during renaming in rotating file handlers are now passed to handleError (except for SystemExit and KeyboardInterrupt, which are re-raised).

Modified: python/trunk/Lib/logging/handlers.py
==============================================================================
--- python/trunk/Lib/logging/handlers.py	(original)
+++ python/trunk/Lib/logging/handlers.py	Mon Jan 16 10:27:58 2006
@@ -131,7 +131,7 @@
             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 @@
         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*")


More information about the Python-checkins mailing list