From bd6d5502ed47e0215a6fdbe989944d8c0f79ad4c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 26 Jan 2015 14:34:45 +0100 Subject: PipeHandle.fileno() now raises an exception if the pipe is closed --- asyncio/windows_utils.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit v1.2.1