Skip to content

Commit

Permalink
fix: level.1.a.missing.filename (#80)
Browse files Browse the repository at this point in the history
* fix: loop all files before returning metadata file

* chore: bump version
  • Loading branch information
wphyojpl authored Sep 7, 2022
1 parent fe5d89d commit beb2fad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def __validate_input(self):

def __get_pds_metadata_file(self):
self.__input_file_list = self.__event['cma']['event']['meta']['input_granules'][0]['files']
pds_metadata_file = None
for each_file in self.__input_file_list:
if 'fileName' not in each_file and 'name' in each_file: # add fileName if there is only name
each_file['fileName'] = each_file['name']
Expand All @@ -136,8 +137,8 @@ def __get_pds_metadata_file(self):
each_file['key'] = s3_key
LOGGER.debug(f'checking file: {each_file}')
if each_file['key'].upper().endswith('.NC.CAS'):
return each_file
return None
pds_metadata_file = each_file
return pds_metadata_file

def __read_pds_metadata_file(self):
self._pds_file_dict = self.__get_pds_metadata_file()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="cumulus_lambda_functions",
version="1.7.0",
version="1.7.1",
packages=find_packages(),
install_requires=install_requires,
tests_require=['mock', 'nose', 'sphinx', 'sphinx_rtd_theme', 'coverage', 'pystac', 'python-dotenv', 'jsonschema'],
Expand Down

0 comments on commit beb2fad

Please sign in to comment.