summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVanessasaurus <814322+vsoch@users.noreply.github.com>2021-05-18 23:33:09 -0600
committerGitHub <noreply@github.com>2021-05-19 07:33:09 +0200
commit8bed109e41d84d7fe5d26b6baeb0da89f5a37904 (patch)
tree615e1e85ce43123f4f1e3e5d7b98fe194c6c34b5 /lib
parent1a5924f5fbf3498c54e979d178ae4d2d4fda7705 (diff)
downloadspack-8bed109e41d84d7fe5d26b6baeb0da89f5a37904.tar.gz
spack-8bed109e41d84d7fe5d26b6baeb0da89f5a37904.tar.bz2
spack-8bed109e41d84d7fe5d26b6baeb0da89f5a37904.tar.xz
spack-8bed109e41d84d7fe5d26b6baeb0da89f5a37904.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/monitor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/monitor.py b/lib/spack/spack/monitor.py
index b4e8475e70..4c89b49b71 100644
--- a/lib/spack/spack/monitor.py
+++ b/lib/spack/spack/monitor.py
@@ -228,7 +228,7 @@ class SpackMonitorClient:
except URLError as e:
# 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):
request = self.prepare_request(
e.url,