python: Convert dict iterators.
authorRussell Bryant <russell@ovn.org>
Mon, 14 Dec 2015 20:13:20 +0000 (15:13 -0500)
committerRussell Bryant <russell@ovn.org>
Fri, 22 Jan 2016 04:00:11 +0000 (23:00 -0500)
commitcb96c1b27e502c591eeeb831f04d92b400d757f4
treedc653f9c3c3ce324404734a7a75565340744df34
parentf7683a72770373d724852feca032a88b6416686e
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>
12 files changed:
debian/ovs-monitor-ipsec
python/build/nroff.py
python/ovs/db/data.py
python/ovs/db/idl.py
python/ovs/db/schema.py
python/ovs/json.py
python/ovs/poller.py
python/ovs/stream.py
python/ovs/vlog.py
tests/test-ovsdb.py
vtep/ovs-vtep
xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync