Index: virt-manager-1.5.0/tests/clitest.py =================================================================== --- virt-manager-1.5.0.orig/tests/clitest.py +++ virt-manager-1.5.0/tests/clitest.py @@ -223,7 +223,7 @@ class Command(object): try: conn = None - for idx in reversed(range(len(self.argv))): + for idx in reversed(list(range(len(self.argv)))): if self.argv[idx] == "--connect": conn = utils.openconn(self.argv[idx + 1]) break Index: virt-manager-1.5.0/tests/uitests/utils.py =================================================================== --- virt-manager-1.5.0.orig/tests/uitests/utils.py +++ virt-manager-1.5.0/tests/uitests/utils.py @@ -1,4 +1,4 @@ -from __future__ import print_function + import logging import os Index: virt-manager-1.5.0/tests/utils.py =================================================================== --- virt-manager-1.5.0.orig/tests/utils.py +++ virt-manager-1.5.0/tests/utils.py @@ -104,11 +104,11 @@ def openconn(uri): conn.fetch_all_nodedevs() _conn_cache[uri] = {} - for key, value in conn._fetch_cache.items(): + for key, value in list(conn._fetch_cache.items()): _conn_cache[uri][key] = value[:] # Prime the internal connection cache - for key, value in _conn_cache[uri].items(): + for key, value in list(_conn_cache[uri].items()): conn._fetch_cache[key] = value[:] def cb_cache_new_pool(poolobj): Index: virt-manager-1.5.0/tests/test_inject.py =================================================================== --- virt-manager-1.5.0.orig/tests/test_inject.py +++ virt-manager-1.5.0/tests/test_inject.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 # Copyright (C) 2013, 2014 Red Hat, Inc. -from __future__ import print_function + import atexit import os @@ -30,7 +30,7 @@ FEDORA_URL = "http://dl.fedoraproject.or (WARN_RHEL4, WARN_RHEL5, - WARN_LATEST) = range(1, 4) + WARN_LATEST) = list(range(1, 4)) def prompt(): @@ -186,7 +186,7 @@ def _make_tests(): return lambda s: _test_distro(_d) idx = 0 - for dname, dobj in _alldistros.items(): + for dname, dobj in list(_alldistros.items()): idx += 1 setattr(FetchTests, "testFetch%.3d_%s" % (idx, dname.replace("-", "_")), _make_fetch_cb(dobj)) Index: virt-manager-1.5.0/tests/test_urls.py =================================================================== --- virt-manager-1.5.0.orig/tests/test_urls.py +++ virt-manager-1.5.0/tests/test_urls.py @@ -253,7 +253,7 @@ def _make_tests(): vals.get("testshortcircuit", "0") == "1") urls[d.name] = d - keys = urls.keys() + keys = list(urls.keys()) keys.sort() for key in keys: distroobj = urls[key] Index: virt-manager-1.5.0/tests/virtconvtest.py =================================================================== --- virt-manager-1.5.0.orig/tests/virtconvtest.py +++ virt-manager-1.5.0/tests/virtconvtest.py @@ -15,7 +15,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. -from __future__ import print_function + import glob import io Index: virt-manager-1.5.0/tests/nodedev.py =================================================================== --- virt-manager-1.5.0.orig/tests/nodedev.py +++ virt-manager-1.5.0/tests/nodedev.py @@ -69,7 +69,7 @@ class TestNodeDev(unittest.TestCase): def _testCompare(self, devname, vals, devxml=None): def _compare(dev, vals, root=""): - for attr in vals.keys(): + for attr in list(vals.keys()): expect = vals[attr] actual = getattr(dev, attr) if isinstance(expect, list):