Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8e9ba0

Browse files
committed
Closes #21742: Merged fix from 3.4.
2 parents 21ceada + 0220048 commit f8e9ba0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/logging/handlers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ def emit(self, record):
463463
# we have an open file handle, clean it up
464464
self.stream.flush()
465465
self.stream.close()
466+
self.stream = None # See Issue #21742: _open () might fail.
466467
# open a new file handle and get new stat info from that fd
467468
self.stream = self._open()
468469
self._statstream()

0 commit comments

Comments
 (0)