diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-12-06 17:19:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 09:19:04 -0700 |
commit | dfab5b5cebb9078278a6c837300f760e5e4a1b4b (patch) | |
tree | 65e9fa3a870dfa310c6d3b7cf7c437c6becc5a2b | |
parent | 862029215cbad657e8fe3e14a91f0b4a03932ecd (diff) | |
download | spack-dfab5b5cebb9078278a6c837300f760e5e4a1b4b.tar.gz spack-dfab5b5cebb9078278a6c837300f760e5e4a1b4b.tar.bz2 spack-dfab5b5cebb9078278a6c837300f760e5e4a1b4b.tar.xz spack-dfab5b5cebb9078278a6c837300f760e5e4a1b4b.zip |
Stop checking for {s3://path}/index.html (#34325)
-rw-r--r-- | lib/spack/spack/s3_handler.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/spack/spack/s3_handler.py b/lib/spack/spack/s3_handler.py index 74eb8466ce..93aea8b160 100644 --- a/lib/spack/spack/s3_handler.py +++ b/lib/spack/spack/s3_handler.py @@ -70,20 +70,6 @@ class UrllibS3Handler(urllib.request.HTTPSHandler): url, headers, stream = _s3_open(orig_url) return urllib.response.addinfourl(stream, headers, url) except ClientError as err: - # if no such [KEY], but [KEY]/index.html exists, - # return that, instead. - if err.response["Error"]["Code"] == "NoSuchKey": - try: - _, headers, stream = _s3_open(url_util.join(orig_url, "index.html")) - return urllib.response.addinfourl(stream, headers, orig_url) - - except ClientError as err2: - if err.response["Error"]["Code"] == "NoSuchKey": - # raise original error - raise urllib.error.URLError(err) from err - - raise urllib.error.URLError(err2) from err2 - raise urllib.error.URLError(err) from err |