mirror of
https://github.com/python/cpython.git
synced 2025-11-02 22:51:25 +00:00
asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed
This commit is contained in:
parent
a19b7b3fca
commit
2a3f38fd29
1 changed files with 2 additions and 0 deletions
|
|
@ -147,6 +147,8 @@ def handle(self):
|
||||||
return self._handle
|
return self._handle
|
||||||
|
|
||||||
def fileno(self):
|
def fileno(self):
|
||||||
|
if self._handle is None:
|
||||||
|
raise ValueError("I/O operatioon on closed pipe")
|
||||||
return self._handle
|
return self._handle
|
||||||
|
|
||||||
def close(self, *, CloseHandle=_winapi.CloseHandle):
|
def close(self, *, CloseHandle=_winapi.CloseHandle):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue