Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a3f38f

Browse files
committed
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
1 parent a19b7b3 commit 2a3f38f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/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)