'Check if connection works
:return: bool'

def test(self):

    rpc = self.getRPC()
    try:
        if rpc.writelog('INFO', 'CouchPotato    connected    to    test    connection'):
            log.debug('Successfully    connected    to    NZBGet')
        else:
            log.info('Successfully    connected    to    NZBGet,    but    unable    to    send    a    message')
    except socket.error:
        log.error('NZBGet    is    not    responding.    Please    ensure    that    NZBGet    is    running    and    host    setting    is    correct.')
        return False
    except xmlrpclib.ProtocolError as e:
        if (e.errcode == 401):
            log.error('Password    is    incorrect.')
        else:
            log.error('Protocol    Error:    %s', e)
        return False
    return True
