Skip to content

Commit abf87ee

Browse files
committed
Remove None values from get_cloud_uris output
Style fix Remove unneeded line
1 parent 503fe7b commit abf87ee

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

astroquery/mast/observations.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,9 @@ def get_cloud_uris(self, data_products=None, *, include_bucket=True, full_url=Fa
979979
uri_map = dict(zip(data_uris, cloud_uris))
980980
return uri_map
981981

982+
# Remove None values from the list
983+
cloud_uris = [uri for uri in cloud_uris if uri is not None]
984+
982985
return cloud_uris
983986

984987
def get_cloud_uri(self, data_product, *, include_bucket=True, full_url=False):

astroquery/mast/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ def mast_relative_path(mast_uri):
295295
path = json_response.get(uri)["path"]
296296
if path is None:
297297
warnings.warn(f"Failed to retrieve MAST relative path for {uri}. Skipping...", NoResultsWarning)
298-
path = None
299298
elif 'galex' in path:
300299
path = path.lstrip("/mast/")
301300
elif '/ps1/' in path:

0 commit comments

Comments
 (0)