def connect(self):
        '''
        Connect to the drone.

        :raises RuntimeError: if the drone is connected or closed already.
        '''
        if self.connected:
            raise RuntimeError(
                '{} is connected already'.format(self.__class__.__name__))
        if self.closed:
            raise RuntimeError(
                '{} is closed already'.format(self.__class__.__name__))
        self.connected = True
        self._connect()
def connect ( self ) : if self . connected : raise RuntimeError ( '{} is connected already' . format ( self . __class__ . __name__ ) ) if self . closed : raise RuntimeError ( '{} is closed already' . format ( self . __class__ . __name__ ) ) self . connected = True self . _connect ( )
Connect to the drone.

        :raises RuntimeError: if the drone is connected or closed already.