We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 071f0b6 commit 8d67346Copy full SHA for 8d67346
metanorm/normalizers/geospaas/earthdata_cmr.py
@@ -82,8 +82,11 @@ def get_instrument(self, raw_metadata):
82
"""Only get the first instrument from the raw metadata, because
83
GeoSPaaS does not support more than one instrument per dataset
84
"""
85
- return utils.get_gcmd_instrument(
86
- raw_metadata['umm']['Platforms'][0]['Instruments'][0]['ShortName'])
+ try:
+ 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)
90
91
@utils.raises((KeyError, IndexError))
92
def get_location_geometry(self, raw_metadata):
0 commit comments