summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-26 14:03:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-26 14:03:44 (GMT)
commit2a3f38fd299c09be89a7872ccd15c4aedd5fc145 (patch)
tree555602e0c44c5b145949c725ea60e5b3761ce035 /Lib/asyncio
parenta19b7b3fcafe52b98245e14466ffc4d6750ca4f1 (diff)
downloadcpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.zip
cpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.tar.gz
cpython-2a3f38fd299c09be89a7872ccd15c4aedd5fc145.tar.bz2
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/windows_utils.py2
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):