[git commit master 1/1] bloat-o-meter: make it python3 compliant

Denys Vlasenko vda.linux at googlemail.com
Thu Oct 28 19:39:40 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=8410ac1a073272affe8acdb0da67e5753ea051f8
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Python 3 doesn't support the iterkeys() method anymore.  Use
iter(foo.keys()) instead of foo.iterkeys().

Signed-off-by: Marek Polacek <mmpolacek at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 scripts/bloat-o-meter |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 95cbbe6..91374c1 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -63,7 +63,7 @@ def getsizes(file):
         else:
             sym[name] = {"addr" : value, "size":  size}
             lut[(value, size)] = 0
-    for addr, sz in alias.iterkeys():
+    for addr, sz in iter(alias.keys()):
         # If the non-GLOBAL sym has an implementation elsewhere then
         # it's an alias, disregard it.
         if not (addr, sz) in lut:
@@ -92,7 +92,7 @@ if flag_timing:
 grow, shrink, add, remove, up, down = 0, 0, 0, 0, 0, 0
 delta, common = [], {}
 
-for name in old.iterkeys():
+for name in iter(old.keys()):
     if name in new:
         common[name] = 1
 
-- 
1.7.1



More information about the busybox-cvs mailing list