Skip to content

Commit d6953f2

Browse files
avvalenxAnthony Valen
and
Anthony Valen
authored
added error messages for malformed and missing key in .harmony file to fix issue #168 (#170)
* added error messages for malformed and missing key in .harmony file * documented .harmony error log changes in chagelog * updated changelog --------- Co-authored-by: Anthony Valen <[email protected]>
1 parent 47306e1 commit d6953f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
7-
### Fixed
87
### Added
9-
### Changed
8+
- Added error messages to inform user if .harmony file is formatted incorrectly or missing a key
109

1110
## [1.15.2]
1211
### Fixed

subscriber/podaac_access.py

+4
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,10 @@ def find_harmony_runs(collection, bbox, starttime, endtime, output_dir, granules
744744
return x['jobid']
745745
except FileNotFoundError:
746746
logging.warning('No .harmony file in the data directory. (Is this the first run?)')
747+
except ValueError:
748+
logging.error('.harmony file malformed')
749+
except KeyError as key:
750+
logging.error(f'.harmony file is missing {key}')
747751
return None
748752

749753

0 commit comments

Comments
 (0)