summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-14 09:23:20 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2014-06-14 09:23:20 (GMT)
commitf8e9ba0fb92e2945df9ba151523982bc53f00b85 (patch)
treeb6bbd3c9c142ed55d959d3aa43dbe14db06c16fe /Lib/logging
parent21ceada492c27832cc262c6f3ac6fd9959bc14e2 (diff)
parent0220048083866034973ce7b05735ded97d2ca4d4 (diff)
downloadcpython-f8e9ba0fb92e2945df9ba151523982bc53f00b85.zip
cpython-f8e9ba0fb92e2945df9ba151523982bc53f00b85.tar.gz
cpython-f8e9ba0fb92e2945df9ba151523982bc53f00b85.tar.bz2
Closes #21742: Merged fix from 3.4.
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/handlers.py1
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()