Loads opt-outs into self.error_numbers

This commit is contained in:
Rick Ross 2023-12-09 09:08:17 -08:00
parent 2695ad5c69
commit 426390d242
2 changed files with 10 additions and 1 deletions

View File

@ -198,6 +198,15 @@ class AFCMUniverseMapFile:
except Exception as ex:
raise Exception(f"universe_map_file.generate_mapped_file: Failed to get {self.optout_s3_bucket}/{errors_filename_s3_key}: {ex}") from ex
if "optout_s3_key" in self.metadata and self.metadata["optout_s3_key"] != None:
try:
file_data_stream = self.optout_s3_connection.get_object(self.optout_s3_bucket,
self.metadata["optout_s3_key"])
optout_numbers = json.load(codecs.getreader("utf-8")(file_data_stream))
self.error_numbers.update(optout_numbers)
except Exception as ex:
raise Exception(f"universe_map_file.generate_mapped_file: Failed to get {self.optout_s3_bucket}/{self.metadata['optout_s3_key']}: {ex}") from ex
# Loop the files from the map
for ufilename in self.mosaic_file_list:
self.process_file(ufilename)

View File

@ -9,7 +9,7 @@ with open('README.md', 'r') as f:
setup(
name='lib_afc_mosaic',
version='0.1.7',
version='0.1.8',
author='',
author_email='',
description='',