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:
|
||||
paths.append(path)
|
||||
|
||||
if self.booted != self.node_services.viewkeys():
|
||||
raise ValueError("failure to boot all services: %s != %s", self.booted, self.node_services.keys())
|
||||
if self.booted != set(self.node_services.iterkeys()):
|
||||
raise ValueError("failure to boot all services: %s != %s" % (self.booted, self.node_services.keys()))
|
||||
|
||||
return paths
|
||||
|
||||
|
@ -170,7 +170,7 @@ class ServiceShim(object):
|
|||
:return: nothing
|
||||
"""
|
||||
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
|
||||
if value:
|
||||
if key == "startidx":
|
||||
|
|
|
@ -155,7 +155,7 @@ def build_node_platform_xml(emane_manager, control_net, node, nem_id, platform_x
|
|||
eventdev = None
|
||||
|
||||
platform_element = platform_xmls.get(key)
|
||||
if not platform_element:
|
||||
if platform_element is None:
|
||||
platform_element = etree.Element("platform")
|
||||
|
||||
if otadev:
|
||||
|
|
Loading…
Reference in a new issue