Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def build(self):
self.log.debug("create and parse manifest")
# fail path in case of erros
fail_log_path = self.config.get_folder(
"download_folder"
) + "/faillogs/faillog-{}.txt".format(self.params["request_hash"])
self.image = Image(self.params)
if self.params["packages_hash"]:
packages_image = set(self.database.get_packages_image(self.params))
self.log.debug("packages_image %s", packages_image)
packages_requested = set(
self.database.get_packages_hash(self.params["packages_hash"])
)
self.log.debug("packages_requested %s", packages_requested)
packages_remove = packages_image - packages_requested
self.log.debug("packages_remove %s", packages_remove)
packages_requested.update(set(map(lambda x: "-" + x, packages_remove)))
self.params["packages"] = " ".join(packages_requested)
self.log.debug("packages param %s", self.params["packages"])
else:
self.log.debug("build package with default packages")