From cba55d040e036a3799159db3c4100a5ae35fd324 Mon Sep 17 00:00:00 2001 From: Carl Oscar Aaro Date: Tue, 17 Nov 2020 21:42:46 +0100 Subject: [PATCH] Check transport before evaluating request without transport --- tomodachi/transport/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomodachi/transport/http.py b/tomodachi/transport/http.py index 293afa287..b8799769c 100644 --- a/tomodachi/transport/http.py +++ b/tomodachi/transport/http.py @@ -1315,7 +1315,7 @@ def get_http_response_status_sync( status_code = int(getattr(value, "status", 500)) if value is not None else 500 return status_code - if verify_transport and request is not None and request.transport is None: + if verify_transport and request is not None and hasattr(request, "transport") and request.transport is None: return 499 if isinstance(value, Response) and value._status: