forked from p34709852/monkey
Island: Simplify error messages in Version
This commit is contained in:
parent
df1b9f0f9c
commit
94a25b07b2
|
@ -62,17 +62,14 @@ class Version:
|
||||||
try:
|
try:
|
||||||
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}: {err}")
|
||||||
return self._version_number, None
|
return self._version_number, None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
download_link = response["download_link"]
|
download_link = response["download_link"]
|
||||||
latest_version = response["version"]
|
latest_version = response["version"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logger.error(
|
logger.error(f"Failed to fetch version information from {url}: {response}")
|
||||||
f"Failed to fetch version information from {url}, response: {response}."
|
|
||||||
f"Most likely deployment {self._deployment.value} is not recognized."
|
|
||||||
)
|
|
||||||
return self._version_number, None
|
return self._version_number, None
|
||||||
|
|
||||||
return latest_version, download_link
|
return latest_version, download_link
|
||||||
|
|
Loading…
Reference in New Issue