Fix #23 Revert a bug introduced with ab32fbbf98
Crash if checking for updates without an internet connection
This commit is contained in:
@@ -77,9 +77,14 @@ def _download_versions_file():
|
||||
}
|
||||
}
|
||||
"""
|
||||
return json.load(
|
||||
BytesIO(download_file(Constants.VERSION_LINK))
|
||||
).get(get_os(), None)
|
||||
try:
|
||||
version_dict = json.load(
|
||||
BytesIO(download_file(Constants.VERSION_LINK))
|
||||
)[get_os()]
|
||||
except Exception:
|
||||
return None
|
||||
else:
|
||||
return version_dict
|
||||
|
||||
|
||||
class VersionController:
|
||||
|
||||
Reference in New Issue
Block a user