def get_latest_version(): try: pkgdata = requests.get("https://pypi.python.org/pypi/platformio/json", headers=util.get_request_defheaders()).json() return pkgdata['info']['version'] except: raise exception.GetLatestVersionError()
def get_latest_version(): try: if not str(VERSION[2]).isdigit(): try: return get_develop_latest_version() except: # pylint: disable=bare-except pass return get_pypi_latest_version() except: raise exception.GetLatestVersionError()