monitor: fix issue with attribute lookup (#23773)

Signed-off-by: vsoch <vsoch@users.noreply.github.com>

Co-authored-by: vsoch <vsoch@users.noreply.github.com>
This commit is contained in:
Vanessasaurus 2021-05-18 23:33:09 -06:00 committed by GitHub
parent 1a5924f5fb
commit 8bed109e41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@ def issue_request(self, request, retry=True):
except URLError as e: except URLError as e:
# If we have an authorization request, retry once with auth # If we have an authorization request, retry once with auth
if e.code == 401 and retry: if hasattr(e, "code") and e.code == 401 and retry:
if self.authenticate_request(e): if self.authenticate_request(e):
request = self.prepare_request( request = self.prepare_request(
e.url, e.url,