def close(self):
        '''Closes connection with the q service.'''
        if self._connection:
            self._connection_file.close()
            self._connection_file = None
            self._connection.close()
            self._connection = None
def close ( self ) : if self . _connection : self . _connection_file . close ( ) self . _connection_file = None self . _connection . close ( ) self . _connection = None
Closes connection with the q service.