Skip to content

Commit

Permalink
Early exit if hypo file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Oct 17, 2024
1 parent 4f30a16 commit b697ead
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sourcespec/ssp_read_event_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ def parse_hypo_file(hypo_file, event_id=None):
:returns:
A tuple of (SSPEvent, picks, format).
"""
if not os.path.exists(hypo_file):
logger.error(f'{hypo_file}: No such file or directory')
ssp_exit(1)
err_msgs = []
parsers = {
'ssp_event_file': _parse_source_spec_event_file,
Expand Down

0 comments on commit b697ead

Please sign in to comment.