diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-11-15 20:42:47 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-11-15 20:42:47 (GMT) |
commit | 5e75829ec300733dc0b81a36d6db69b823cf9da8 (patch) | |
tree | f02f5d87c197af18ec3eeaeb84223ea208f68821 /Lib/logging | |
parent | 5e2d45672c8f84f6b1877e68ab92b4b50e2d124d (diff) | |
parent | a76157dca6ba0d063a88cf4c0b6ac132881001b1 (diff) | |
download | cpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.zip cpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.tar.gz cpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.tar.bz2 |
Closes #19523: Merged fix from 3.3.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 9359afb..9b41b9d 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -990,8 +990,10 @@ class FileHandler(StreamHandler): self.flush() if hasattr(self.stream, "close"): self.stream.close() - StreamHandler.close(self) self.stream = None + # Issue #19523: call unconditionally to + # prevent a handler leak when delay is set + StreamHandler.close(self) finally: self.release() |