From e5b8c975d8cd291b5c5459ec0c71af94320354dc Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 20 Dec 2024 16:56:14 -0800 Subject: [PATCH] Remove another layer of indirection --- repo2docker/contentproviders/hydroshare.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/repo2docker/contentproviders/hydroshare.py b/repo2docker/contentproviders/hydroshare.py index ba232365..24a4d888 100755 --- a/repo2docker/contentproviders/hydroshare.py +++ b/repo2docker/contentproviders/hydroshare.py @@ -60,13 +60,9 @@ def detect(self, spec, ref=None, extra_args=None): if parsed.netloc in self.HYDROSHARE_DOMAINS: return url - def _urlretrieve(self, bag_url): - return urlretrieve(bag_url) - def fetch(self, spec, output_dir, yield_output=False, timeout=120): """Fetch and unpack a Hydroshare resource""" url = spec - print(url) parts = urlparse(url) self.resource_id = parts.path.strip("/").rsplit("/", maxsplit=1)[1] @@ -98,7 +94,7 @@ def fetch(self, spec, output_dir, yield_output=False, timeout=120): raise ContentProviderException(msg) # Bag creation seems to need a small time buffer after it says it's ready. time.sleep(1) - filehandle, _ = self._urlretrieve(bag_url) + filehandle, _ = urlretrieve(bag_url) zip_file_object = zipfile.ZipFile(filehandle, "r") yield "Downloaded, unpacking contents.\n"