Commit 88c2c876 authored by Mijian Xu's avatar Mijian Xu 😷
Browse files

fix exit bug when event not found

parent 45662c3a
/opt/bqmail/download_seed.py
\ No newline at end of file
/home/xumj/Codes/bqmail/download_seed.py
\ No newline at end of file
......@@ -180,6 +180,7 @@ else:
event.append([date.strftime('%Y %m %d %H %M %S'), dateend.strftime('%Y %m %d %H %M %S')])
if not event:
print('No events found in the range')
sys.exit(1)
msg = generatemsg(NAME, INST, EMAIL, MEDIA, ALTERNATEMEDIA, LABEL)
for row in event:
......
#!/bin/bash
mkdir ./bin
rm -f ./bin/*
ln -s `pwd`/bqmail.py `pwd`/bin/bqmail
ln -s `pwd`/searchDMC.py `pwd`/bin/searchDMC
ln -s `pwd`/updateCatalog.py `pwd`/bin/updateCatalog
ln -s `pwd`/bqmail_conti.py `pwd`/bin/bqmail_conti
ln -s `pwd`/download_seed.py `pwd`/bin/download_seed
'''
if [ `uname` == "Darwin" ]; then
if grep "export PATH=`pwd`/bin:\$PATH" ~/.bash_profile
then
......@@ -26,4 +26,3 @@ else
fi
fi
exec $SHELL -l
'''
......@@ -18,7 +18,7 @@ def wsfetch(server, starttime=None, endtime=None, minlatitude=None,
client = Client(server)
cat = client.get_events(**locs)
data = [[evt.origins[0].time, evt.origins[0].latitude, evt.origins[0].longitude, evt.origins[0].depth * 0.001,
evt.magnitudes[0].mag, evt.magnitudes[0].magnitude_type] for evt in cat]
evt.magnitudes[0].mag] for evt in cat if evt.origins[0].depth is not None]
return data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment