summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Knoepfel <knoepfel@fnal.gov>2024-04-18 10:50:15 -0500
committerGitHub <noreply@github.com>2024-04-18 08:50:15 -0700
commit17e07741891ef8cbf586011be1ede75ed42f401d (patch)
tree40618576706ce87add04a50138fbdebee58c9e7a
parent3162c2459dec7654ae37fa9d1086aa94300df110 (diff)
downloadspack-17e07741891ef8cbf586011be1ede75ed42f401d.tar.gz
spack-17e07741891ef8cbf586011be1ede75ed42f401d.tar.bz2
spack-17e07741891ef8cbf586011be1ede75ed42f401d.tar.xz
spack-17e07741891ef8cbf586011be1ede75ed42f401d.zip
Make sure variable is None if exception is raised. (#43707)
-rw-r--r--lib/spack/spack/util/web.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 24f4f53618..8da447b8bf 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -707,6 +707,7 @@ def _spider(url: urllib.parse.ParseResult, collect_nested: bool, _visited: Set[s
raw_link = metadata_parser.fragments.pop()
abs_link = url_util.join(response_url, raw_link.strip(), resolve_href=True)
+ fragment_response_url = None
try:
# This seems to be text/html, though text/fragment+html is also used
fragment_response_url, _, fragment_response = read_from_url(abs_link, "text/html")