AttributeError in report client error path
Bug #1742311 reported by
Eric Fried
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
This [1] is clearly wrong.
elif not result:
It triggers if `result` evaluates to False, then tries to access result.status_code and result.text.
To post a comment you must log in.
This isn't clearly wrong, because the result is a requests.Response which overrides __bool__ and returns True for an OK response and False for any response status code >=400.
https:/ /github. com/requests/ requests/ blob/v2. 18.4/requests/ models. py#L663