autobuild-run: fix copy_if_exists()
PATCH v2 1/1 autobuild-run: fix copy_if_exists()
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.
---
Changes:V1->V2: change 'dir' and 'd' into 'directory'
scripts/autobuild-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/autobuild-run +3 -3
@@ -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")
Signature · 1 line
2.17.1
PATCH v2 1/1 autobuild-run: fix copy_if_exists()
Giulio, All,
On 2019-05-30 12:33 +0200, Giulio Benetti spake thusly:
Quoted 7 lines
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 <[email protected]>
Regards,
Yann E. MORIN.
Quoted 27 lines
---
Changes:V1->V2: change 'dir' and 'd' into 'directory'scripts/autobuild-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)scripts/autobuild-run +3
-3@@ -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")Signature · 1 line
2.17.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 autobuild-run: fix copy_if_exists()
In reply to Giulio BenettiQuoted 10 lines · On Thu, 30 May 2019 12:33:05 +0200 Giulio Benetti…
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 <[email protected]>---
Changes:V1->V2: change 'dir' and 'd' into 'directory'
Applied to buildroot-test, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com