(self, buf: Union[bytearray, memoryview])
| 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 | |
| 1673 | def doctests() -> Any: |
nothing calls this directly
no test coverage detected