From 5484cbb328d2923c7089c7ca302c52231cb3df61 Mon Sep 17 00:00:00 2001 From: Anthony Valen Date: Wed, 1 May 2024 22:05:30 -0500 Subject: [PATCH 1/3] added error messages for malformed and missing key in .harmony file --- subscriber/podaac_access.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subscriber/podaac_access.py b/subscriber/podaac_access.py index a898569..0904b16 100644 --- a/subscriber/podaac_access.py +++ b/subscriber/podaac_access.py @@ -744,6 +744,10 @@ def find_harmony_runs(collection, bbox, starttime, endtime, output_dir, granules return x['jobid'] except FileNotFoundError: logging.warning('No .harmony file in the data directory. (Is this the first run?)') + except ValueError: + logging.error('.harmony file malformed') + except KeyError as key: + logging.error(f'.harmony file is missing {key}') return None From b439b3026fe2191058a4074d5a61e84e6f7bbc85 Mon Sep 17 00:00:00 2001 From: Anthony Valen Date: Thu, 2 May 2024 16:32:45 -0500 Subject: [PATCH 2/3] documented .harmony error log changes in chagelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd5b05..a77e995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [1.15.3] +### Added +- Added error messages to inform user if .harmony file is formatted incorrectly or missing a key + ## [1.15.2] ### Fixed - Fixed bug where --subset in combination with the subscriber caused errors From e416da786f8567c6d340f53ba360df2330475cb2 Mon Sep 17 00:00:00 2001 From: Anthony Valen Date: Thu, 2 May 2024 16:35:50 -0500 Subject: [PATCH 3/3] updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a77e995..c77c016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [1.15.3] +## [Unreleased] ### Added - Added error messages to inform user if .harmony file is formatted incorrectly or missing a key