[Python-checkins] cpython (3.4): asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
victor.stinner
python-checkins at python.org
Mon Jan 26 15:05:20 CET 2015
https://hg.python.org/cpython/rev/7ade2d9c3b91
changeset: 94317:7ade2d9c3b91
branch: 3.4
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jan 26 15:03:44 2015 +0100
summary:
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
files:
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
--- a/Lib/asyncio/windows_utils.py
+++ b/Lib/asyncio/windows_utils.py
@@ -147,6 +147,8 @@
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):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list