Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/neutron/privileged/agent/linux/ip_lib.py b/neutron/privileged/agent/linux/ip_lib.py
- index 6e8d98c824..4993fe4d29 100644
- --- a/neutron/privileged/agent/linux/ip_lib.py
- +++ b/neutron/privileged/agent/linux/ip_lib.py
- @@ -522,13 +522,14 @@ def make_serializable(value):
- def _ensure_string(value):
- # NOTE(ralonsoh): once PY2 is deprecated, the str() conversion will be
- # no needed and six.binary_type --> bytes.
- + return value.decode() if isinstance(value, bytes) else value
- return (str(value.decode('utf-8'))
- if isinstance(value, six.binary_type) else value)
- if isinstance(value, list):
- return [make_serializable(item) for item in value]
- elif isinstance(value, netlink.nla_slot):
- - return [value[0], make_serializable(value[1])]
- + return [value[0].decode() if isinstance(value[0], bytes) else value[0], make_serializable(value[1])]
- elif isinstance(value, netlink.nla_base) and six.PY3:
- return make_serializable(value.dump())
- elif isinstance(value, dict):
Advertisement
Add Comment
Please, Sign In to add comment