(self, *args)
| 385 | return self |
| 386 | |
| 387 | def __exit__(self, *args): |
| 388 | is_connected = lambda: hasattr(self, "file") |
| 389 | if is_connected(): |
| 390 | try: |
| 391 | self.quit() |
| 392 | except (OSError, EOFError): |
| 393 | pass |
| 394 | finally: |
| 395 | if is_connected(): |
| 396 | self._close() |
| 397 | |
| 398 | def _create_socket(self, timeout): |
| 399 | if timeout is not None and not timeout: |