diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-01-21 23:35:57 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-01-21 23:35:57 (GMT) |
commit | 01241d6c358ba55332c1ba91c65157548349bdc8 (patch) | |
tree | 58f23ab61e2426841282f39b9aa58243918f06a9 | |
parent | 00d650baaa72477d6904cce9667ca18e916405e6 (diff) | |
download | cpython-01241d6c358ba55332c1ba91c65157548349bdc8.zip cpython-01241d6c358ba55332c1ba91c65157548349bdc8.tar.gz cpython-01241d6c358ba55332c1ba91c65157548349bdc8.tar.bz2 |
Issue #10949: Improved robustness of rotating file handlers.
-rw-r--r-- | Lib/logging/handlers.py | 2 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 96cdcc6..96384bd 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -120,6 +120,7 @@ class RotatingFileHandler(BaseRotatingHandler): """ if self.stream: self.stream.close() + self.stream = None if self.backupCount > 0: for i in range(self.backupCount - 1, 0, -1): sfn = "%s.%d" % (self.baseFilename, i) @@ -316,6 +317,7 @@ class TimedRotatingFileHandler(BaseRotatingHandler): """ if self.stream: self.stream.close() + self.stream = None # get the time that this sequence started at and make it a TimeTuple t = self.rolloverAt - self.interval if self.utc: @@ -16,6 +16,8 @@ Core and Builtins Library ------- +- Issue #10949: Improved robustness of rotating file handlers. + - Issue #10955: Fix a potential crash when trying to mmap() a file past its length. Initial patch by Ross Lagerwall. |