def get_request(url, err_msg):
        try:
            req = requests.get(url)
        except requests.ConnectionError:
            abort(err_msg)

        if not req.status_code == requests.codes.ok:
            abort(err_msg)

        return req
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/collect.py/get_request/original