Skip to content

Commit

Permalink
Check transport before evaluating request without transport
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuff committed Nov 17, 2020
1 parent f032852 commit cba55d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tomodachi/transport/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cba55d0

Please sign in to comment.