def run_version_check():
    logging.info("Performing version check.")
    logging.info("Current version: %s", current_version)

    data = json_dumps({
        'current_version': current_version
    })
    headers = {'content-type': 'application/json'}

    try:
        response = requests.post('https://version.redash.io/api/report?channel=stable',
                                 data=data, headers=headers, timeout=3.0)
        latest_version = response.json()['release']['version']

        _compare_and_update(latest_version)
    except requests.RequestException:
        logging.exception("Failed checking for new version.")
    except (__HOLE__, KeyError):
        logging.exception("Failed checking for new version (probably bad/non-JSON response).")
dataset/ETHPy150Open getredash/redash/redash/version_check.py/run_version_check