summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/logging/handlers.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index d1e0a91..718c04d 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -58,9 +58,12 @@ class BaseRotatingHandler(logging.FileHandler):
Output the record to the file, catering for rollover as described
in doRollover().
"""
- if self.shouldRollover(record):
- self.doRollover()
- logging.FileHandler.emit(self, record)
+ try:
+ if self.shouldRollover(record):
+ self.doRollover()
+ logging.FileHandler.emit(self, record)
+ except:
+ self.handleError(record)
class RotatingFileHandler(BaseRotatingHandler):
"""