Skip to content

Commit 362dd2d

Browse files
author
Mike Hearne
authored
Merge pull request #246 from mhearne-usgs/histfix
Fixed bug in shakemap history code
2 parents bb1eb2f + 9a4d950 commit 362dd2d

10 files changed

Lines changed: 31787 additions & 26679 deletions

libcomcat/dataframes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,11 @@ def _describe_shakemap(event, product):
11101110
depth_used = np.nan
11111111
pversion = 0
11121112
if product.hasProperty('maxmmi'):
1113-
maxmmi = float(product['maxmmi'])
1113+
try:
1114+
# maxmmi may not be set in oceanic maps
1115+
maxmmi = float(product['maxmmi'])
1116+
except:
1117+
pass
11141118
pversion = int(product['version'])
11151119

11161120
(ninstrument, ndyfi, mag_used,

tests/libcomcat/cassettes/dataframes_association.yaml

Lines changed: 1173 additions & 1051 deletions
Large diffs are not rendered by default.

tests/libcomcat/cassettes/dataframes_detailed.yaml

Lines changed: 1898 additions & 1686 deletions
Large diffs are not rendered by default.

tests/libcomcat/cassettes/dataframes_dyfi.yaml

Lines changed: 8610 additions & 7130 deletions
Large diffs are not rendered by default.

tests/libcomcat/cassettes/dataframes_history.yaml

Lines changed: 12655 additions & 12463 deletions
Large diffs are not rendered by default.

tests/libcomcat/cassettes/dataframes_magnitude.yaml

Lines changed: 1345 additions & 1112 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)