mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Closes #19523: Merged fix from 3.3.
This commit is contained in:
commit
5e75829ec3
2 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue