Skip to content

Commit 8d67346

Browse files
committed
earthdata CMR: allow unknown platform
1 parent 071f0b6 commit 8d67346

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

metanorm/normalizers/geospaas/earthdata_cmr.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ def get_instrument(self, raw_metadata):
8282
"""Only get the first instrument from the raw metadata, because
8383
GeoSPaaS does not support more than one instrument per dataset
8484
"""
85-
return utils.get_gcmd_instrument(
86-
raw_metadata['umm']['Platforms'][0]['Instruments'][0]['ShortName'])
85+
try:
86+
return utils.get_gcmd_instrument(
87+
raw_metadata['umm']['Platforms'][0]['Instruments'][0]['ShortName'])
88+
except KeyError:
89+
return utils.get_gcmd_instrument(utils.UNKNOWN)
8790

8891
@utils.raises((KeyError, IndexError))
8992
def get_location_geometry(self, raw_metadata):

0 commit comments

Comments
 (0)