diff options
author | yuyafei <yu.yafei@zte.com.cn> | 2016-06-25 11:52:29 +0800 |
---|---|---|
committer | Kairat Kushaev <kkushaev@mirantis.com> | 2016-06-28 11:54:43 +0000 |
commit | 19d8df31fdbb88439fc7876ea474b0abd465b240 (patch) | |
tree | 5d244cc6415971299a5361da689c2e31c81655d7 /tools | |
parent | 4b10efd855e6a321e068703262bb9b17f4a0484e (diff) | |
download | glance_store-19d8df31fdbb88439fc7876ea474b0abd465b240.tar.gz |
Replace dict.iterkeys with six.iterkeys to make PY3 compatible
Python3 do not use dict.iterkeys, which would raise AttributeError:
'dict' object has no attribute 'iterkeys'.
Change-Id: I97e320eac9f2f0b2cb5cf34a1d3fc57e80e440ed
Closes-Bug: #1596124
Diffstat (limited to 'tools')
-rw-r--r--[-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 64f5f4e..d205eb0 100755..100644 --- a/tools/colorizer.py +++ b/tools/colorizer.py @@ -42,6 +42,7 @@ """Display a subunit stream through a colorized unittest test runner.""" import heapq +import six import subunit import sys import unittest @@ -276,7 +277,7 @@ class SubunitTestResult(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() |