diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 14:03:44 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 14:03:44 (GMT) |
commit | 2a3f38fd299c09be89a7872ccd15c4aedd5fc145 (patch) | |
tree | 555602e0c44c5b145949c725ea60e5b3761ce035 | |
parent | a19b7b3fcafe52b98245e14466ffc4d6750ca4f1 (diff) | |
download | cpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.zip cpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.tar.gz cpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.tar.bz2 |
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
-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 e664296..5f8327e 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): |