Skip to content

Commit

Permalink
Fix _make_symlinks to handle the case where `config.options.trace_p…
Browse files Browse the repository at this point in the history
…ath` is None

Also, add `config.options.asdf_file` to the list of files to symlink.
  • Loading branch information
claudiodsf committed Jul 22, 2024
1 parent 1038ba2 commit fbd5570
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions sourcespec2/ssp_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,17 @@ def _make_symlinks():
out_data_dir = os.path.join(outdir, 'input_files')
rel_path = os.path.relpath(config.workdir, out_data_dir)
os.makedirs(out_data_dir, exist_ok=True)
filelist =\
list(config.options.trace_path) +\
[
config.options.station_metadata,
config.options.hypo_file,
config.options.pick_file,
config.options.qml_file,
]
try:
filelist = list(config.options.trace_path)
except TypeError:
filelist = []
filelist += [
config.options.station_metadata,
config.options.hypo_file,
config.options.pick_file,
config.options.qml_file,
config.options.asdf_file,
]
for filename in filelist:
if filename is None or not os.path.exists(filename):
continue
Expand Down

0 comments on commit fbd5570

Please sign in to comment.