diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-06-14 09:22:05 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-06-14 09:22:05 (GMT) |
commit | 0220048083866034973ce7b05735ded97d2ca4d4 (patch) | |
tree | 1ae33b8eff8e91afa9af41248ce343780f90354b /Lib/logging | |
parent | e0d324d02b5a9a5c22d79d0443ca68bf33398978 (diff) | |
download | cpython-0220048083866034973ce7b05735ded97d2ca4d4.zip cpython-0220048083866034973ce7b05735ded97d2ca4d4.tar.gz cpython-0220048083866034973ce7b05735ded97d2ca4d4.tar.bz2 |
Issue #21742: Set stream to None after closing.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/handlers.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index f547d17..0e58dbe 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -463,6 +463,7 @@ class WatchedFileHandler(logging.FileHandler): # we have an open file handle, clean it up self.stream.flush() self.stream.close() + self.stream = None # See Issue #21742: _open () might fail. # open a new file handle and get new stat info from that fd self.stream = self._open() self._statstream() |