Skip to content

Commit

Permalink
Check if code is legal
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Oct 4, 2018
1 parent a54da5a commit 60ecd36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HinetPy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ def get_waveform(self, code, starttime, span,
raise ValueError("Span is NOT in the allowed range [1, 357913]")

# 2. check starttime and endtime
if code not in NETWORK.keys():
raise ValueError("{}: Incorrect network code.".format(code))

time0 = NETWORK[code].starttime
# time1 = UTCTime + JST(GMT+0900) - 2 hour delay
time1 = datetime.utcnow() + timedelta(hours=9) + timedelta(hours=-2)
Expand Down

0 comments on commit 60ecd36

Please sign in to comment.