MCPcopy Create free account
hub / github.com/EasyIME/PIME / read_from_fd

Method read_from_fd

python/python3/tornado/iostream.py:1658–1670  ·  view source on GitHub ↗
(self, buf: Union[bytearray, memoryview])

Source from the content-addressed store, hash-verified

1656 del data
1657
1658 def read_from_fd(self, buf: Union[bytearray, memoryview]) -> Optional[int]:
1659 try:
1660 return self._fio.readinto(buf) # type: ignore
1661 except (IOError, OSError) as e:
1662 if errno_from_exception(e) == errno.EBADF:
1663 # If the writing half of a pipe is closed, select will
1664 # report it as readable but reads will fail with EBADF.
1665 self.close(exc_info=e)
1666 return None
1667 else:
1668 raise
1669 finally:
1670 del buf
1671
1672
1673def doctests() -> Any:

Callers

nothing calls this directly

Calls 2

errno_from_exceptionFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected