f
This commit is contained in:
3
CLI.py
3
CLI.py
@@ -31,6 +31,7 @@ if not os.environ.get("MM_DEBUG"):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
import httpx
|
||||
import json
|
||||
import shlex
|
||||
import sys
|
||||
@@ -1681,6 +1682,8 @@ Come to love it when others take what you share, as there is no greater joy
|
||||
code = int(getattr(resp, "status_code", 0) or 0)
|
||||
ok = 200 <= code < 500
|
||||
return ok, f"{url} (HTTP {code})"
|
||||
except httpx.TimeoutException:
|
||||
return False, f"{url} (timeout)"
|
||||
except Exception as exc:
|
||||
return False, f"{url} ({type(exc).__name__})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user