mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
python: Convert dict iterators.
In Python 2, dict.items(), dict.keys(), and dict.values() returned a list. dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned an iterator. As of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys() are gone. items(), keys(), and values() now return an iterator. In the case where we want an iterator, we now use the six.iter*() helpers. If we want a list, we explicitly create a list from the iterator. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -89,7 +89,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
|
||||
s += node.attributes['db'].nodeValue
|
||||
else:
|
||||
raise error.Error("'ref' lacks required attributes: %s"
|
||||
% node.attributes.keys())
|
||||
% list(node.attributes.keys()))
|
||||
return s + font
|
||||
elif node.tagName in ['var', 'dfn', 'i']:
|
||||
s = r'\fI'
|
||||
|
Reference in New Issue
Block a user