From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists()
Date: Fri, 31 May 2019 22:49:39 +0200 [thread overview]
Message-ID: <20190531204939.GD3407@scaer> (raw)
In-Reply-To: <20190530103305.37919-1-giulio.benetti@micronovasrl.com>
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. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-05-31 20:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 10:33 [Buildroot] [PATCH v2] autobuild-run: fix copy_if_exists() Giulio Benetti
2019-05-31 20:49 ` Yann E. MORIN [this message]
2019-06-01 7:05 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190531204939.GD3407@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox