From: Vivien Didelot Date: Mon, 23 Jun 2014 14:23:37 +0000 (-0400) Subject: graph-build-time: support python3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cf527426fb129a026b65bd7fd5c61a152e71413;p=buildroot.git graph-build-time: support python3 This patch is the result of 2to3. Signed-off-by: Vivien Didelot Acked-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Thomas Petazzoni --- diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time index 8ef065f127..524c30d478 100755 --- a/support/scripts/graph-build-time +++ b/support/scripts/graph-build-time @@ -80,16 +80,16 @@ class Package: self.steps_start[step] = time else: self.steps_end[step] = time - if self.steps_start.has_key(step) and self.steps_end.has_key(step): + if step in self.steps_start and step in self.steps_end: self.steps_duration[step] = self.steps_end[step] - self.steps_start[step] def get_duration(self, step=None): if step is None: duration = 0 - for step in self.steps_duration.keys(): + for step in list(self.steps_duration.keys()): duration += self.steps_duration[step] return duration - if self.steps_duration.has_key(step): + if step in self.steps_duration: return self.steps_duration[step] return 0