Commit 73f3f296 authored by Julien Muchembled's avatar Julien Muchembled

Fix error handling with new slapos.recipe.build when download fails

parent b422c016
......@@ -313,7 +313,8 @@ class Recipe(object):
opt['shared'] = 'false'
downloadunpacked.Recipe(self.buildout, self.name, opt).install()
except:
shutil.rmtree(compile_dir)
if os.path.exists(compile_dir):
shutil.rmtree(compile_dir)
raise
else:
log.info('Using local source directory: %s', self.options['path'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment