'Resolve a query via PAC.
Args: QNetworkProxyQuery.
Return a list of QNetworkProxy objects in order of preference.'

def resolve(self, query):

    self._wait()
    from_file = (self._pac_url.scheme() == 'file')
    try:
        return self._pac.resolve(query, from_file=from_file)
    except (EvalProxyError, ParseProxyError) as e:
        log.network.exception('Error    in    PAC    resolution:    {}.'.format(e))
        error_host = 'pac-resolve-error.qutebrowser.invalid'
        return [QNetworkProxy(QNetworkProxy.HttpProxy, error_host, 9)]
