Skip to content

Commit

Permalink
Do not issue a warning when writing QuakeML files
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jan 24, 2025
1 parent 8f64550 commit 70472fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion seiscat/fetchdata/event_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
(https://www.gnu.org/licenses/gpl-3.0-standalone.html)
"""
import pathlib
import warnings
from obspy.clients.fdsn.header import FDSNNotImplementedException
from ..database.dbfunctions import read_events_from_db
from ..sources.fdsnws import open_fdsn_connection
Expand Down Expand Up @@ -43,5 +44,7 @@ def fetch_event_details(config):
event = client.get_events(eventid=evid, includearrivals=True)
except FDSNNotImplementedException:
event = client.get_events(eventid=evid)
event.write(outfile, format='QUAKEML')
with warnings.catch_warnings():
warnings.simplefilter("ignore")
event.write(outfile, format='QUAKEML')
print(f'event details saved to {outfile}')

0 comments on commit 70472fb

Please sign in to comment.