summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index f85f04efb2..bb7d446240 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -1437,13 +1437,7 @@ class GCSFetchStrategy(URLFetchStrategy):
basename = os.path.basename(parsed_url.path)
with working_dir(self.stage.path):
- import spack.util.s3 as s3_util
- s3 = s3_util.create_s3_session(self.url,
- connection=s3_util.get_mirror_connection(parsed_url), url_type="fetch") # noqa: E501
-
- headers = s3.get_object(Bucket=parsed_url.netloc,
- Key=parsed_url.path.lstrip("/"))
- stream = headers["Body"]
+ _, headers, stream = web_util.read_from_url(self.url)
with open(basename, 'wb') as f:
shutil.copyfileobj(stream, f)