Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added error messages for malformed and missing key in .harmony file to fix issue #168 #170

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading