]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Don't use dict.iterkeys()
authorVictor Stinner <vstinner@redhat.com>
Mon, 25 May 2015 14:30:23 +0000 (16:30 +0200)
committerVictor Stinner <vstinner@redhat.com>
Mon, 25 May 2015 20:20:28 +0000 (22:20 +0200)
Replace list(dict.iterkeys()) with list(dict). The call to iterkeys() is
useless and the iterkeys() method of dictionaries was removed in
Python 3

Change-Id: I16733643d4b92fe8134eec2549bbd679fe75fb9c

tools/colorizer.py

index 423e89817e79a8370211952e72d1f7e95c747fd3..4498d9a5e83e6e9a0fb4da1ee462a6aad7f101aa 100755 (executable)
@@ -274,7 +274,7 @@ class NovaTestResult(testtools.TestResult):
         self.stopTestRun()
 
     def stopTestRun(self):
-        for cls in list(self.results.iterkeys()):
+        for cls in list(self.results):
             self.writeTestCase(cls)
         self.stream.writeln()
         self.writeSlowTests()