diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 14:34:45 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 14:34:45 +0100 |
commit | bd6d5502ed47e0215a6fdbe989944d8c0f79ad4c (patch) | |
tree | 1d5accd1d8e08f6748df0fd22794840eefce7fc5 | |
parent | 600a6d02d4342cc0adef631888862ea6b41f310d (diff) | |
download | trollius-bd6d5502ed47e0215a6fdbe989944d8c0f79ad4c.tar.gz |
PipeHandle.fileno() now raises an exception if the pipe is closed
-rw-r--r-- | asyncio/windows_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asyncio/windows_utils.py b/asyncio/windows_utils.py index e664296..5f8327e 100644 --- a/asyncio/windows_utils.py +++ b/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): |