(self)
Close the connection without assuming anything about it.
Close the connection without assuming anything about it.
Close the connection without assuming anything about it .
def close(self):
        '''Close the connection without assuming anything about it.'''
        try:
            file = self.file
            self.file = None
            if file is not None:
                file.close()
        finally:
            sock = self.sock
            self.sock = None
            if sock is not None:
                sock.close()
def close ( self ) : try : file = self . file self . file = None if file is not None : file . close ( ) finally : sock = self . sock self . sock = None if sock is not None : sock . close ( )