summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-11-15 20:42:47 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-11-15 20:42:47 (GMT)
commit5e75829ec300733dc0b81a36d6db69b823cf9da8 (patch)
treef02f5d87c197af18ec3eeaeb84223ea208f68821 /Lib
parent5e2d45672c8f84f6b1877e68ab92b4b50e2d124d (diff)
parenta76157dca6ba0d063a88cf4c0b6ac132881001b1 (diff)
downloadcpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.zip
cpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.tar.gz
cpython-5e75829ec300733dc0b81a36d6db69b823cf9da8.tar.bz2
Closes #19523: Merged fix from 3.3.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/logging/__init__.py4
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()