diff options
| author | Aymeric Augustin | 2013-10-16 23:17:59 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-17 18:24:58 +0200 |
| commit | dc19b418a258bf7d7cabebfe83690b5b0291f60f (patch) | |
| tree | 0b00913aa6d1fc23b797717002bcf9c20123db27 /debug_toolbar/panels/profiling.py | |
| parent | 87a73758431a417f6f1aa7313260e1049549f713 (diff) | |
| download | django-debug-toolbar-dc19b418a258bf7d7cabebfe83690b5b0291f60f.tar.bz2 | |
Stopped using dict.iter*.
Since performance isn't a primary concern, the non-iterable versions
will do just fine on Python 2.
Diffstat (limited to 'debug_toolbar/panels/profiling.py')
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |
