Commit de71044b authored by Tatuya Kamada's avatar Tatuya Kamada

Fix the issue that generate.cloudooo recipe does not work

when we do not put the cloudoo-json parameter as a slapos-parameter.
parent e35f1361
...@@ -38,6 +38,8 @@ class Recipe(GenericSlapRecipe): ...@@ -38,6 +38,8 @@ class Recipe(GenericSlapRecipe):
def _generateRealTemplate(self): def _generateRealTemplate(self):
# TODO check json against schema # TODO check json against schema
json_data = {}
if self.parameter_dict.get('cloudooo-json', None):
json_data = json.loads(self.parameter_dict['cloudooo-json']) json_data = json.loads(self.parameter_dict['cloudooo-json'])
# dymanic fonts # dymanic fonts
font_url_list = json_data.get('font_url_list', []) font_url_list = json_data.get('font_url_list', [])
...@@ -50,7 +52,6 @@ class Recipe(GenericSlapRecipe): ...@@ -50,7 +52,6 @@ class Recipe(GenericSlapRecipe):
def _install(self): def _install(self):
if not os.path.exists(self.dirname): if not os.path.exists(self.dirname):
os.mkdir(self.dirname) os.mkdir(self.dirname)
if "cloudooo-json" in self.parameter_dict:
try: try:
self._generateRealTemplate() self._generateRealTemplate()
except Exception: except Exception:
......
...@@ -22,6 +22,7 @@ offline = true ...@@ -22,6 +22,7 @@ offline = true
[slap-parameter] [slap-parameter]
# default site id # default site id
site-id = erp5 site-id = erp5
cloudooo-json =
[test-runner] [test-runner]
recipe = slapos.cookbook:erp5.test recipe = slapos.cookbook:erp5.test
......
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