8000 PipeHandle.fileno() now raises an exception if the pipe is closed · python/asyncio@4945c1a · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit 4945c1a

Browse files
committed
PipeHandle.fileno() now raises an exception if the pipe is closed
1 parent febe4cb commit 4945c1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

asyncio/windows_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def handle(self):
147147
return self._handle
148148

149149
def fileno(self):
150+
if self._handle is None:
151+
raise ValueError("I/O operatioon on closed pipe")
150152
return self._handle
151153

152154
def close(self, *, CloseHandle=_winapi.CloseHandle):

0 commit comments

Comments
 (0)
0