Commit 8dd2915c authored by Łukasz Nowak's avatar Łukasz Nowak

Template generation shall never fail.

In case of instantiating erp5 software type the later buildout will fail with
correct error message. But template is generated *always*, even in cases when
some data are not available yet.
parent 49abfd30
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
from slapos.recipe.librecipe import GenericSlapRecipe from slapos.recipe.librecipe import GenericSlapRecipe
import os import os
import json import json
import traceback
SECTION_BACKEND_PUBLISHER = """[publish-apache-backend-list] SECTION_BACKEND_PUBLISHER = """[publish-apache-backend-list]
recipe = slapos.cookbook:publish""" recipe = slapos.cookbook:publish"""
...@@ -167,5 +168,9 @@ class Recipe(GenericSlapRecipe): ...@@ -167,5 +168,9 @@ class Recipe(GenericSlapRecipe):
with open(self.options['output'], 'w') as f: with open(self.options['output'], 'w') as f:
f.write("[buildout]\nparts =\n") f.write("[buildout]\nparts =\n")
else: else:
self._generateRealTemplate() try:
self._generateRealTemplate()
except Exception:
print 'Ignored issue during template generation:\n%s' % \
traceback.format_exc()
return [self.dirname] return [self.dirname]
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