Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] autobuild-run: remove only tarballs from download dir
Date: Mon, 16 Apr 2018 18:09:25 +0200	[thread overview]
Message-ID: <20180416180925.464f3435@windsurf.numericable.fr> (raw)
In-Reply-To: <20180413133431.19449-1-ricardo.martincoski@gmail.com>

Hello,

On Fri, 13 Apr 2018 10:34:31 -0300, Ricardo Martincoski wrote:

> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index 33d0ae9..6a01151 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -291,6 +291,9 @@ def prepare_build(**kwargs):
>      # recursively find files under root
>      def find_files(root):
>          for r, d, f in os.walk(root):
> +            if '.git' in d:
> +                d[:] = list()

Python question: is there any advantage in doing d[:] = list() instead
of just d = list() ?

Also, do we need to actually set d to the empty list ? We're anyway
doing a continue, and skipping over to the next iteration, where a new
value of d will be returned by os.walk(). Am I missing something ?

I think I'm also missing how this will prevent from iterating in
sub-directories, like git/<something>/foo/. I guess I need to read
again how os.walk() is working exactly.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2018-04-16 16:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 13:34 [Buildroot] [PATCH] autobuild-run: remove only tarballs from download dir Ricardo Martincoski
2018-04-15 19:42 ` Thomas Petazzoni
2018-04-15 19:49   ` Yann E. MORIN
2018-04-15 20:02     ` Thomas Petazzoni
2018-04-15 20:10       ` Yann E. MORIN
2018-04-15 20:38         ` Thomas Petazzoni
2018-04-15 20:59           ` Yann E. MORIN
2018-04-15 23:18     ` Ricardo Martincoski
2018-04-15 22:23   ` Ricardo Martincoski
2018-04-16  9:01     ` Yann E. MORIN
2018-04-16 16:05     ` Thomas Petazzoni
2018-04-16 16:09 ` Thomas Petazzoni [this message]
2018-04-17  4:38   ` Ricardo Martincoski
2018-04-17  7:12 ` [Buildroot] [PATCH v2] " Ricardo Martincoski
2018-04-19 21:39   ` 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=20180416180925.464f3435@windsurf.numericable.fr \
    --to=thomas.petazzoni@bootlin.com \
    --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