spoolman: really fix type checking this time
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
8d6def7e41
commit
66de18f9b6
|
@ -103,7 +103,8 @@ class SpoolManager:
|
||||||
def _get_response_error(self, response: HttpResponse) -> str:
|
def _get_response_error(self, response: HttpResponse) -> str:
|
||||||
err_msg = f"HTTP error: {response.status_code} {response.error}"
|
err_msg = f"HTTP error: {response.status_code} {response.error}"
|
||||||
try:
|
try:
|
||||||
resp: Dict[str, Any] = response.json()
|
resp = response.json()
|
||||||
|
assert isinstance(resp, dict)
|
||||||
json_msg: str = resp["message"]
|
json_msg: str = resp["message"]
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue