diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 15:03:44 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 15:03:44 +0100 |
commit | 2a3f38fd299c09be89a7872ccd15c4aedd5fc145 (patch) | |
tree | 555602e0c44c5b145949c725ea60e5b3761ce035 /Lib/asyncio/windows_utils.py | |
parent | a19b7b3fcafe52b98245e14466ffc4d6750ca4f1 (diff) | |
download | cpython-git-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.tar.gz |
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
Diffstat (limited to 'Lib/asyncio/windows_utils.py')
-rw-r--r-- | Lib/asyncio/windows_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/asyncio/windows_utils.py b/Lib/asyncio/windows_utils.py index e6642960db..5f8327eba6 100644 --- a/Lib/asyncio/windows_utils.py +++ b/Lib/asyncio/windows_utils.py @@ -147,6 +147,8 @@ class PipeHandle: return self._handle def fileno(self): + if self._handle is None: + raise ValueError("I/O operatioon on closed pipe") return self._handle def close(self, *, CloseHandle=_winapi.CloseHandle): |