mirror of
https://github.com/mvt-project/mvt.git
synced 2026-02-12 16:42:45 +00:00
Fix error reporting for update check failures (#555)
This commit is contained in:
committed by
GitHub
parent
f4bf3f362b
commit
5ef19a327c
@@ -18,10 +18,13 @@ def check_updates() -> None:
|
||||
try:
|
||||
mvt_updates = MVTUpdates()
|
||||
latest_version = mvt_updates.check()
|
||||
except requests.exceptions.Timeout:
|
||||
log.verbose("Couldn't check latest MVT version")
|
||||
except Exception:
|
||||
pass
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
|
||||
rich_print(
|
||||
"\t\t[bold]Note: Could not check for MVT updates.[/bold] "
|
||||
"You may be working offline. Please update MVT regularly."
|
||||
)
|
||||
except Exception as e:
|
||||
log.error("Error encountered when trying to check latest MVT version: %s", e)
|
||||
else:
|
||||
if latest_version:
|
||||
rich_print(
|
||||
@@ -54,10 +57,13 @@ def check_updates() -> None:
|
||||
|
||||
try:
|
||||
ioc_to_update = ioc_updates.check()
|
||||
except requests.exceptions.Timeout:
|
||||
log.verbose("Couldn't check latest indicators")
|
||||
except Exception:
|
||||
pass
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.Timeout):
|
||||
rich_print(
|
||||
"\t\t[bold]Note: Could not check for indicator updates.[/bold] "
|
||||
"You may be working offline. Please update MVT indicators regularly."
|
||||
)
|
||||
except Exception as e:
|
||||
log.error("Error encountered when trying to check latest MVT indicators: %s", e)
|
||||
else:
|
||||
if ioc_to_update:
|
||||
rich_print(
|
||||
|
||||
Reference in New Issue
Block a user