diff --git a/src/risotto/image.py b/src/risotto/image.py index 7cb81f1..8e7e318 100644 --- a/src/risotto/image.py +++ b/src/risotto/image.py @@ -121,7 +121,6 @@ class Image: def list_images(self): - print(self.builds) for build in self.builds: dependencies = [self.applications[build]['path']] self.calc_depends(dependencies, build) @@ -285,7 +284,16 @@ class Image: recipe[key] = value with open(packer_filename, 'w') as recipe_fd: jdump(recipe, recipe_fd, indent=2) - print(['packer', 'build', packer_filename]) + preprocessors = join(tmp_directory, 'preprocessors') + if isfile(preprocessors): + proc = Popen([preprocessors], + #stdout=PIPE, + #stderr=PIPE, + cwd=tmp_directory, + ) + proc.wait() + if proc.returncode: + raise Exception(_(f'error when executing {preprocessors}')) proc = Popen(['packer', 'build', packer_filename], #stdout=PIPE, #stderr=PIPE,