PipeHandle.fileno() now raises an exception if the pipe is closed
This commit is contained in:
parent
febe4cb812
commit
4945c1a5f6
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user