From ec621d2b98fed24e7ad008c3d9f64407ba2aa4c2 Mon Sep 17 00:00:00 2001 From: Alan De Smet <alan.desmet@ssec.wisc.edu> Date: Mon, 5 Aug 2024 09:58:11 -0500 Subject: [PATCH] Ensure base URLs always end in / Handles case where a user specifies a custom URL of something like http://foo.com/ancillary which would expand to something like http://foo.com/ancillary2024-08-05-file.data https://gitlab.ssec.wisc.edu/cspp_geo/cspp-geo-aitf/-/issues/468 --- csppfetch/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/csppfetch/__init__.py b/csppfetch/__init__.py index 60e1529..9f5fba8 100644 --- a/csppfetch/__init__.py +++ b/csppfetch/__init__.py @@ -1083,6 +1083,7 @@ class Downloader: if ':/' not in u: logging.warning(f"Assuming that {u} (from {envname}) should be file:///{u}") u = "file:///"+u + if not u.endswith('/'): u += '/' checkedurls.append(u) return checkedurls -- GitLab