use json import, 'unjson' name sounds weird.

parent bfd63e6f
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
############################################################################## ##############################################################################
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
import json import json
from json import loads as unjson
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
""" """
...@@ -85,7 +84,7 @@ class Recipe(GenericBaseRecipe): ...@@ -85,7 +84,7 @@ class Recipe(GenericBaseRecipe):
def install(self): def install(self):
# Generate rewrite rules # Generate rewrite rules
rewrite_rule_list = self._getRewriteRuleContent( rewrite_rule_list = self._getRewriteRuleContent(
unjson(self.options['slave-instance-list'])) json.loads(self.options['slave-instance-list']))
# Create Map # Create Map
map_content = self._getProxyTableContent(rewrite_rule_list) map_content = self._getProxyTableContent(rewrite_rule_list)
map_file = self.createFile(self.options['map-path'], map_content) map_file = self.createFile(self.options['map-path'], map_content)
......
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