def do_remote(self):
        args = {"verify": self.verify_ssl}
        if self.etag:
            args["headers"] = {"If-None-Match": self.etag}

        try:
            logging.debug('KeyBundle fetch keys from: {}'.format(self.source))
            r = requests.get(self.source, **args)
        except requests.ConnectionError as e:
            raise UpdateFailed(
                "Remote key update from '{}' failed: {}.".format(self.source,
                                                                 str(e)))

        if r.status_code == 304:  # file has not changed
            self.time_out = time.time() + self.cache_time
            self.last_updated = time.time()
            return False
        elif r.status_code == 200:  # New content
            self.time_out = time.time() + self.cache_time

            self.imp_jwks = self._parse_remote_response(r)
            if not isinstance(self.imp_jwks,
                              dict) or "keys" not in self.imp_jwks:
                raise UpdateFailed(
                    "Remote key update from '{}' failed, malformed "
                    "JWKS.".format(
                        self.source))

            logger.debug("Loaded JWKS: %s from %s" % (r.text, self.source))
            try:
                self.do_keys(self.imp_jwks["keys"])
            except KeyError:
                logger.error("No 'keys' keyword in JWKS")
                raise UpdateFailed(
                    "Remote key update from '{}' failed.".format(self.source))

            try:
                self.etag = r.headers["Etag"]
            except __HOLE__:
                pass
        else:
            raise UpdateFailed(
                "Remote key update from '{}' failed, HTTP status {}".format(
                    self.source,
                    r.status_code))

        self.last_updated = time.time()
        return True
dataset/ETHPy150Open rohe/pyoidc/src/oic/utils/keyio.py/KeyBundle.do_remote