From a0cbeee486a5ec933db28fc0ef7a3cfcbd2553a1 Mon Sep 17 00:00:00 2001 From: Angeline Burrell Date: Wed, 31 Jul 2024 14:14:14 -0400 Subject: [PATCH 1/2] BUG: test returned output Test returned output to provide an empty list if no remote files were found. --- pysatNASA/instruments/methods/cdaweb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/cdaweb.py b/pysatNASA/instruments/methods/cdaweb.py index 1a3b1382..e60d3d74 100644 --- a/pysatNASA/instruments/methods/cdaweb.py +++ b/pysatNASA/instruments/methods/cdaweb.py @@ -981,7 +981,9 @@ def cdas_list_remote_files(tag='', inst_id='', start=None, stop=None, og_files = cdas.get_original_files(dataset=dataset, start=start, end=stop) - if series_out: + if og_files[1] is None: + file_list = pds.Series(dtype=str) if series_out else [] + elif series_out: name_list = [os.path.basename(f['Name']) for f in og_files[1]] t_stamp = [pds.Timestamp(f['StartTime'][:10]) for f in og_files[1]] file_list = pds.Series(data=name_list, index=t_stamp) From 39d4d631ec2a9d7b8ea8fa73f6163a9c3375cd29 Mon Sep 17 00:00:00 2001 From: Angeline Burrell Date: Wed, 31 Jul 2024 14:15:29 -0400 Subject: [PATCH 2/2] DOC: update changelog Added a line to the changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88a0e1e4..ebcca592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). * Allow graceful failure with no files in jhuapl load functions * New window needs to be integer for calculate_imf_steadiness * Fixed a bug where cdas_download may drop the requested end date file + * Fixed a bug where cdas_list_remote_files errored without remote data * Documentation * Added example of how to export data for archival * Updated documentation refs