From: Victor Stinner Date: Mon, 26 Jan 2015 14:03:44 +0000 (+0100) Subject: asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed X-Git-Tag: v3.4.3rc1~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a3f38fd299c09be89a7872ccd15c4aedd5fc145;p=python asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed --- 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):