Close the connection without assuming anything about it.
(self)
| 661 | return resp |
| 662 | |
| 663 | def close(self): |
| 664 | '''Close the connection without assuming anything about it.''' |
| 665 | try: |
| 666 | file = self.file |
| 667 | self.file = None |
| 668 | if file is not None: |
| 669 | file.close() |
| 670 | finally: |
| 671 | sock = self.sock |
| 672 | self.sock = None |
| 673 | if sock is not None: |
| 674 | sock.close() |
| 675 | |
| 676 | try: |
| 677 | import ssl |
no outgoing calls
no test coverage detected