Close the connection without assuming anything about it.
(self)
| 655 | return resp |
| 656 | |
| 657 | def close(self): |
| 658 | '''Close the connection without assuming anything about it.''' |
| 659 | try: |
| 660 | file = self.file |
| 661 | self.file = None |
| 662 | if file is not None: |
| 663 | file.close() |
| 664 | finally: |
| 665 | sock = self.sock |
| 666 | self.sock = None |
| 667 | if sock is not None: |
| 668 | sock.close() |
| 669 | |
| 670 | try: |
| 671 | import ssl |
no outgoing calls