Skip to content

Commit

Permalink
added error messages for malformed and missing key in .harmony file t…
Browse files Browse the repository at this point in the history
…o 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]>
  • Loading branch information
avvalenx and Anthony Valen committed May 9, 2024
1 parent 47306e1 commit d6953f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ 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/)

## [Unreleased]
### Fixed
### Added
### Changed
- Added error messages to inform user if .harmony file is formatted incorrectly or missing a key

## [1.15.2]
### Fixed
Expand Down
4 changes: 4 additions & 0 deletions subscriber/podaac_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d6953f2

Please sign in to comment.