'Run an eiscp command and catch connection errors.'

def command(self, command):

    try:
        result = self._receiver.command(command)
    except (ValueError, OSError, AttributeError, AssertionError):
        if self._receiver.command_socket:
            self._receiver.command_socket = None
            _LOGGER.info('Resetting    connection    to    %s', self._name)
        else:
            _LOGGER.info('%s    is    disconnected.    Attempting    to    reconnect', self._name)
        return False
    return result
