From dc19b418a258bf7d7cabebfe83690b5b0291f60f Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 16 Oct 2013 23:17:59 +0200 Subject: Stopped using dict.iter*. Since performance isn't a primary concern, the non-iterable versions will do just fine on Python 2. --- debug_toolbar/panels/profiling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/panels/profiling.py') diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index 6adb279..f71472b 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -23,7 +23,7 @@ class DjangoDebugToolbarStats(Stats): def get_root_func(self): if self.__root is None: - for func, (cc, nc, tt, ct, callers) in self.stats.iteritems(): + for func, (cc, nc, tt, ct, callers) in self.stats.items(): if len(callers) == 0: self.__root = func break @@ -80,7 +80,7 @@ class FunctionCall(object): i = 0 h, s, v = self.hsv count = len(self.statobj.all_callees[self.func]) - for func, stats in self.statobj.all_callees[self.func].iteritems(): + for func, stats in self.statobj.all_callees[self.func].items(): i += 1 h1 = h + (i / count) / (self.depth + 1) if stats[3] == 0: -- cgit v1.2.3