mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 11:49:26 +08:00
Fix: Regard all exception as failure
This commit is contained in:
@@ -172,7 +172,7 @@ class ServerChecker:
|
||||
try:
|
||||
_ = requests.get('https://www.baidu.com', timeout=5)
|
||||
network_available = True
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.ConnectTimeout):
|
||||
except Exception as e:
|
||||
network_available = False
|
||||
|
||||
if network_available:
|
||||
|
||||
Reference in New Issue
Block a user