* [Buildroot] [PATCH] graph-build-time: support python3
@ 2014-06-23 14:23 Vivien Didelot
2014-06-23 16:17 ` Arnout Vandecappelle
2014-06-29 8:45 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Vivien Didelot @ 2014-06-23 14:23 UTC (permalink / raw)
To: buildroot
This patch is the result of 2to3.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
support/scripts/graph-build-time | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time
index 8ef065f..524c30d 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
--
2.0.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] graph-build-time: support python3
2014-06-23 14:23 [Buildroot] [PATCH] graph-build-time: support python3 Vivien Didelot
@ 2014-06-23 16:17 ` Arnout Vandecappelle
2014-06-29 8:45 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2014-06-23 16:17 UTC (permalink / raw)
To: buildroot
On 23/06/14 16:23, Vivien Didelot wrote:
> This patch is the result of 2to3.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(with Python 2.7.7 and Python 3.4.1)
Regards,
Arnout
> ---
> support/scripts/graph-build-time | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time
> index 8ef065f..524c30d 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
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] graph-build-time: support python3
2014-06-23 14:23 [Buildroot] [PATCH] graph-build-time: support python3 Vivien Didelot
2014-06-23 16:17 ` Arnout Vandecappelle
@ 2014-06-29 8:45 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-06-29 8:45 UTC (permalink / raw)
To: buildroot
Dear Vivien Didelot,
On Mon, 23 Jun 2014 10:23:37 -0400, Vivien Didelot wrote:
> This patch is the result of 2to3.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> support/scripts/graph-build-time | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-29 8:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 14:23 [Buildroot] [PATCH] graph-build-time: support python3 Vivien Didelot
2014-06-23 16:17 ` Arnout Vandecappelle
2014-06-29 8:45 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox