Island: Return current version number instead of None

This commit is contained in:
vakarisz 2022-08-11 17:57:07 +03:00
parent 5ffec0eb4f
commit bec7bef1b3
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class Version:
response = requests.get(url, timeout=LATEST_VERSION_TIMEOUT).json() response = requests.get(url, timeout=LATEST_VERSION_TIMEOUT).json()
except requests.exceptions.RequestException as err: except requests.exceptions.RequestException as err:
logger.warning(f"Failed to connect to {url}, Error: {err}") logger.warning(f"Failed to connect to {url}, Error: {err}")
return None, None return self._version_number, None
try: try:
download_link = response["download_link"] download_link = response["download_link"]
@ -73,6 +73,6 @@ class Version:
f"Failed to fetch version information from {url}, response: {response}." f"Failed to fetch version information from {url}, response: {response}."
f"Most likely deployment {self._deployment.value} is not recognized." f"Most likely deployment {self._deployment.value} is not recognized."
) )
return None, None return self._version_number, None
return latest_version, download_link return latest_version, download_link