fixed issue with viewkeys behaving different between versions of python 2.7
This commit is contained in:
parent
4a9c751935
commit
4f592d0651
2 changed files with 4 additions and 4 deletions
|
@ -70,8 +70,8 @@ class ServiceDependencies(object):
|
||||||
if path:
|
if path:
|
||||||
paths.append(path)
|
paths.append(path)
|
||||||
|
|
||||||
if self.booted != self.node_services.viewkeys():
|
if self.booted != set(self.node_services.iterkeys()):
|
||||||
raise ValueError("failure to boot all services: %s != %s", self.booted, self.node_services.keys())
|
raise ValueError("failure to boot all services: %s != %s" % (self.booted, self.node_services.keys()))
|
||||||
|
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class ServiceShim(object):
|
||||||
:return: nothing
|
:return: nothing
|
||||||
"""
|
"""
|
||||||
if key not in cls.keys:
|
if key not in cls.keys:
|
||||||
raise ValueError('key `%s` not in `%s`' % (key, cls.keys))
|
raise ValueError("key `%s` not in `%s`" % (key, cls.keys))
|
||||||
# this handles data conversion to int, string, and tuples
|
# this handles data conversion to int, string, and tuples
|
||||||
if value:
|
if value:
|
||||||
if key == "startidx":
|
if key == "startidx":
|
||||||
|
|
|
@ -155,7 +155,7 @@ def build_node_platform_xml(emane_manager, control_net, node, nem_id, platform_x
|
||||||
eventdev = None
|
eventdev = None
|
||||||
|
|
||||||
platform_element = platform_xmls.get(key)
|
platform_element = platform_xmls.get(key)
|
||||||
if not platform_element:
|
if platform_element is None:
|
||||||
platform_element = etree.Element("platform")
|
platform_element = etree.Element("platform")
|
||||||
|
|
||||||
if otadev:
|
if otadev:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue