* [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists()
@ 2019-05-30 10:33 Giulio Benetti
2019-05-31 20:49 ` Yann E. MORIN
2019-06-01 7:05 ` Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Giulio Benetti @ 2019-05-30 10:33 UTC (permalink / raw)
To: buildroot
Under copy_if_exists() 'dir' variable is referenced as 'd' leading to
exception.
Substitute 'd' and 'dir' with 'directory' in copy_if_exists(), since
'dir' is a keyword in Python.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
Changes:
V1->V2: change 'dir' and 'd' into 'directory'
scripts/autobuild-run | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index 56bab25..8d58a83 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -488,9 +488,9 @@ def send_results(result, **kwargs):
shutil.copyfile(os.path.join(outputdir, "branch"),
os.path.join(resultdir, "branch"))
- def copy_if_exists(dir, src, dst=None):
- if os.path.exists(os.path.join(outputdir, d, src)):
- shutil.copyfile(os.path.join(outputdir, d, src),
+ def copy_if_exists(directory, src, dst=None):
+ if os.path.exists(os.path.join(outputdir, directory, src)):
+ shutil.copyfile(os.path.join(outputdir, directory, src),
os.path.join(resultdir, src if dst is None else dst))
copy_if_exists("build", "build-time.log")
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists()
2019-05-30 10:33 [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists() Giulio Benetti
@ 2019-05-31 20:49 ` Yann E. MORIN
2019-06-01 7:05 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2019-05-31 20:49 UTC (permalink / raw)
To: buildroot
Giulio, All,
On 2019-05-30 12:33 +0200, Giulio Benetti spake thusly:
> Under copy_if_exists() 'dir' variable is referenced as 'd' leading to
> exception.
>
> Substitute 'd' and 'dir' with 'directory' in copy_if_exists(), since
> 'dir' is a keyword in Python.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> Changes:
> V1->V2: change 'dir' and 'd' into 'directory'
>
> scripts/autobuild-run | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index 56bab25..8d58a83 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -488,9 +488,9 @@ def send_results(result, **kwargs):
> shutil.copyfile(os.path.join(outputdir, "branch"),
> os.path.join(resultdir, "branch"))
>
> - def copy_if_exists(dir, src, dst=None):
> - if os.path.exists(os.path.join(outputdir, d, src)):
> - shutil.copyfile(os.path.join(outputdir, d, src),
> + def copy_if_exists(directory, src, dst=None):
> + if os.path.exists(os.path.join(outputdir, directory, src)):
> + shutil.copyfile(os.path.join(outputdir, directory, src),
> os.path.join(resultdir, src if dst is None else dst))
>
> copy_if_exists("build", "build-time.log")
> --
> 2.17.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists()
2019-05-30 10:33 [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists() Giulio Benetti
2019-05-31 20:49 ` Yann E. MORIN
@ 2019-06-01 7:05 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-06-01 7:05 UTC (permalink / raw)
To: buildroot
On Thu, 30 May 2019 12:33:05 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:
> Under copy_if_exists() 'dir' variable is referenced as 'd' leading to
> exception.
>
> Substitute 'd' and 'dir' with 'directory' in copy_if_exists(), since
> 'dir' is a keyword in Python.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> Changes:
> V1->V2: change 'dir' and 'd' into 'directory'
Applied to buildroot-test, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-01 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 10:33 [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists() Giulio Benetti
2019-05-31 20:49 ` Yann E. MORIN
2019-06-01 7:05 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox