diff options
| author | Chuck Short <chuck.short@canonical.com> | 2013-06-11 13:22:56 -0500 |
|---|---|---|
| committer | Chuck Short <chuck.short@canonical.com> | 2013-06-11 13:29:13 -0500 |
| commit | d12d7a73ff6a1de482bcdb978e0fb7afd8cfe648 (patch) | |
| tree | e2db49263b8559fac321ee5b23b3bbdc69d9c22f /tools | |
| parent | 93557c1929f9cdbd229fc3f11236c694e8abdee3 (diff) | |
| download | python-cinderclient-d12d7a73ff6a1de482bcdb978e0fb7afd8cfe648.tar.gz | |
python3: compatibility for iteritems and iterkeys
Use six to allow python2/pyton3 for iteritems and
iterkeys.
six.iteriems() replaces dictionary.iteritems() (python2)
and dictionary.iterms() (python3)
six.iterkeys() replaces dictionary.iterkeys (python2)
and dictionary.keys() (python3)
Change-Id: I26c80b78a7dedf3aa32eedf01a83ff6d1e592ba7
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/colorizer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/colorizer.py b/tools/colorizer.py index a49abb1..9547802 100755 --- a/tools/colorizer.py +++ b/tools/colorizer.py @@ -47,6 +47,7 @@ import subunit import sys import unittest +import six import testtools @@ -277,7 +278,7 @@ class NovaTestResult(testtools.TestResult): self.stopTestRun() def stopTestRun(self): - for cls in list(self.results.iterkeys()): + for cls in list(six.iterkeys(self.results)): self.writeTestCase(cls) self.stream.writeln() self.writeSlowTests() |
