From 66de18f9b60814a75e714a6a8aeb5ca91f97bf78 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 16 Jan 2024 13:57:20 -0500 Subject: [PATCH] spoolman: really fix type checking this time Signed-off-by: Eric Callahan --- moonraker/components/spoolman.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonraker/components/spoolman.py b/moonraker/components/spoolman.py index c5b25ac..5e21ed4 100644 --- a/moonraker/components/spoolman.py +++ b/moonraker/components/spoolman.py @@ -103,7 +103,8 @@ class SpoolManager: def _get_response_error(self, response: HttpResponse) -> str: err_msg = f"HTTP error: {response.status_code} {response.error}" try: - resp: Dict[str, Any] = response.json() + resp = response.json() + assert isinstance(resp, dict) json_msg: str = resp["message"] except Exception: pass