Commit 0564a72b authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

wip

parent 8a1db2fc
...@@ -198,7 +198,7 @@ class Recipe(object): ...@@ -198,7 +198,7 @@ class Recipe(object):
except KeyError: except KeyError:
if self.failed is None: if self.failed is None:
self.failed = param self.failed = param
if isinstance(value, unicode): if six.PY2 and isinstance(value, unicode):
value = value.encode('UTF-8') value = value.encode('UTF-8')
options['connection-%s' % param] = value options['connection-%s' % param] = value
......
...@@ -31,6 +31,7 @@ import os ...@@ -31,6 +31,7 @@ import os
import slapos.slap import slapos.slap
from slapos.recipe.librecipe import unwrap from slapos.recipe.librecipe import unwrap
import six
from six import iteritems from six import iteritems
from six.moves.configparser import RawConfigParser from six.moves.configparser import RawConfigParser
from netaddr import valid_ipv4, valid_ipv6 from netaddr import valid_ipv4, valid_ipv6
...@@ -254,7 +255,7 @@ class Recipe(object): ...@@ -254,7 +255,7 @@ class Recipe(object):
# be very careful with overriding master's information # be very careful with overriding master's information
for key, value in flatten_dict(partition_params).items(): for key, value in flatten_dict(partition_params).items():
if key not in options: if key not in options:
if isinstance(value, unicode): if six.PY2 and isinstance(value, unicode):
value = value.encode('UTF-8') value = value.encode('UTF-8')
options[key] = value options[key] = value
# print out augmented options to see what we are passing # print out augmented options to see what we are passing
......
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