Skip to content

Commit

Permalink
Allow for FDSN event URL to be None
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Dec 2, 2024
1 parent 78a3363 commit ea644f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion seiscat/config/configspec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extra_field_defaults = force_list(default=None)
## FDSN event webservice URL or shortcut for event data and metadata
# It can be an ObsPy supported shortcut (ex., ISC, USGS, RESIF)
# or a full URL (ex., http://www.isc.ac.uk/fdsnws/event/1/)
fdsn_event_url = string(default=USGS)
fdsn_event_url = string(default=None)
# List of FDSN web service providers to download waveforms and station metadata
# They can be ObsPy supported shortcuts (ex., IRIS, SCEDC, RESIF) or full URLs
# (ex., http://service.iris.edu/fdsnws/). Leave it as None to use all the
Expand Down
5 changes: 4 additions & 1 deletion seiscat/sources/fdsnws.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def open_fdsn_connection(config):
:param config: config object
:returns: FDSN client object
"""
return Client(config['fdsn_event_url'])
fdsn_event_url = config.get('fdsn_event_url')
if fdsn_event_url is None:
raise ValueError('FDSN event URL not set.')
return Client(fdsn_event_url)


def _to_utc_datetime(time):
Expand Down

0 comments on commit ea644f9

Please sign in to comment.