The requests.Response evaluates to True if it is HTTP 200 OK,
otherwise it is False. The code changes by this commit however
wanted to check if e.response is None or set to some Response.
This did not work, because even if e.response was set, it evaluated
to False, because its status code was 401.
The
requests.Responseevaluates toTrueif it isHTTP 200 OK,otherwise it is
False. The code changes by this commit howeverwanted to check if
e.responseis None or set to some Response.This did not work, because even if
e.responsewas set, it evaluatedto
False, because its status code was401.