renaming variable

This commit is contained in:
msramalho
2023-09-15 19:52:47 +01:00
parent ea38a604bb
commit b157f9a6b1

View File

@@ -95,17 +95,17 @@ class WaczArchiverEnricher(Enricher, Archiver):
return False
if use_docker:
filename = os.path.join(browsertrix_home_container, "collections", collection, f"{collection}.wacz")
wacz_fn = os.path.join(browsertrix_home_container, "collections", collection, f"{collection}.wacz")
else:
filename = os.path.join("collections", collection, f"{collection}.wacz")
wacz_fn = os.path.join("collections", collection, f"{collection}.wacz")
if not os.path.exists(filename):
logger.warning(f"Unable to locate and upload WACZ {filename=}")
if not os.path.exists(wacz_fn):
logger.warning(f"Unable to locate and upload WACZ {wacz_fn=}")
return False
to_enrich.add_media(Media(filename), "browsertrix")
to_enrich.add_media(Media(wacz_fn), "browsertrix")
if self.extract_media:
self.extract_media_from_wacz(to_enrich, filename)
self.extract_media_from_wacz(to_enrich, wacz_fn)
return True
def extract_media_from_wacz(self, to_enrich: Metadata, wacz_filename: str) -> None: