All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [autobuild v2 1/3] autobuild-run: prevent send_result from failing when gathering config files
@ 2015-04-29 20:10 Samuel Martin
  2015-04-29 20:10 ` [Buildroot] [autobuild v2 2/3] autobuild-run: also save CMake config log files on package failure Samuel Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Samuel Martin @ 2015-04-29 20:10 UTC (permalink / raw)
  To: buildroot

os.makedirs() can fail if the directory already exists, so only create it
when needed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1->v2
- remove useless abspath call
---
 scripts/autobuild-run | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index 0e12080..6e83de9 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -661,7 +661,8 @@ def send_results(result, **kwargs):
 
             for fname in files:
                 if fname == 'config.log':
-                    os.makedirs(dest)
+                    if not os.path.exists(dest):
+                        os.makedirs(dest)
                     shutil.copy(os.path.join(root, fname), os.path.join(dest, fname))
 
     copy_config_log_files()
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-04 20:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 20:10 [Buildroot] [autobuild v2 1/3] autobuild-run: prevent send_result from failing when gathering config files Samuel Martin
2015-04-29 20:10 ` [Buildroot] [autobuild v2 2/3] autobuild-run: also save CMake config log files on package failure Samuel Martin
2015-04-29 22:54   ` André Erdmann
2015-05-04 20:12     ` Thomas Petazzoni
2015-05-04 20:12   ` Thomas Petazzoni
2015-04-29 20:10 ` [Buildroot] [autobuild v2 3/3] autobuild-run: allow to change default git uri and branch on the command line Samuel Martin
2015-04-29 22:25   ` André Erdmann
2015-04-30  5:20     ` Samuel Martin
2015-04-30 18:20       ` André Erdmann
2015-05-04 20:11   ` Thomas Petazzoni
2015-05-04 20:12 ` [Buildroot] [autobuild v2 1/3] autobuild-run: prevent send_result from failing when gathering config files Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.