summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-06-19 20:46:46 -0500
committerChuck Short <chuck.short@canonical.com>2013-06-19 20:52:22 -0500
commit3044671b3647cd9a6b14b6262baa44567c6e995b (patch)
tree635e243e2c42b8396c2e02e2b40ad3d40ecad42a /tools
parent89fb1503e91ae6485058659086f46a1dc0454f07 (diff)
downloadpython-cinderclient-3044671b3647cd9a6b14b6262baa44567c6e995b.tar.gz
python3: Fix traceback while running tests
The testsuite is full of the following: TypeError: 'dict_keys' object does not support indexing This is due to the fact in python3 dict methods dict.keys(), dict.items() and dict.values() return “views” instead of lists. Change-Id: Ifa5383e6485fdbabf363fd1442877b2452346c1c Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/colorizer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/colorizer.py b/tools/colorizer.py
index 9547802..1b6e576 100755
--- a/tools/colorizer.py
+++ b/tools/colorizer.py
@@ -267,7 +267,7 @@ class NovaTestResult(testtools.TestResult):
if not self.last_written or (self._now() - time).total_seconds() > 2.0:
diff = 3.0
while diff > 2.0:
- classes = self.results.keys()
+ classes =list(self.results.keys())
oldest = min(classes, key=lambda x: self.last_time[x])
diff = (self._now() - self.last_time[oldest]).total_seconds()
self.writeTestCase(oldest)