An interpreted, interactive, object-oriented programming language
CentOS Sources
2017-08-01 71084d584ff953f5463757ec6536406320560b4d
commit | author | age
71084d 1
CS 2 # HG changeset patch
3 # User Vinay Sajip <vinay_sajip@yahoo.co.uk>
4 # Date 1402737594 -3600
5 # Node ID bb8b0c7fefd0c5ed99b3f336178a4f9554a1d0ef
6 # Parent  31adcc4c43916f7448c9dd8048ad5be7e5bb6456
7 Issue #21742: Set stream to None after closing.
8
9 diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
10 --- a/Lib/logging/handlers.py
11 +++ b/Lib/logging/handlers.py
12 @@ -423,6 +423,7 @@ class WatchedFileHandler(logging.FileHan
13                  # we have an open file handle, clean it up
14                  self.stream.flush()
15                  self.stream.close()
16 +                self.stream = None  # See Issue #21742: _open () might fail.
17                  # open a new file handle and get new stat info from that fd
18                  self.stream = self._open()
19                  self._statstream()
20