Commit 05ea7d61 authored by Marco Mariani's avatar Marco Mariani

use new buildout, do not call loads()

parent 8c8d9d16
...@@ -34,8 +34,6 @@ from zc.buildout import UserError ...@@ -34,8 +34,6 @@ from zc.buildout import UserError
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
# TODO: read ipv6 host without calling loads()
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
"""\ """\
...@@ -56,12 +54,9 @@ class Recipe(GenericBaseRecipe): ...@@ -56,12 +54,9 @@ class Recipe(GenericBaseRecipe):
Returns a string represtation of ipv6_host. Returns a string represtation of ipv6_host.
May receive a regular string, a set or a string serialized by buildout. May receive a regular string, a set or a string serialized by buildout.
""" """
from zc.buildout import buildout
ipv6_host = options['ipv6_host'] ipv6_host = options['ipv6_host']
if ipv6_host.startswith(buildout.SERIALISED_VALUE_MAGIC): if isinstance(ipv6_host, set):
return buildout.loads(ipv6_host).pop()
elif isinstance(ipv6_host, set):
return ipv6_host.pop() return ipv6_host.pop()
else: else:
return ipv6_host return ipv6_host
......
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