Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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

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