[oe-commits] Saul Wold : combo-layer: Make directories only if they don't exisit yet

git at git.openembedded.org git at git.openembedded.org
Tue Jan 28 00:49:27 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 24188967209bad291545909ddb89af35ab3f6021
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=24188967209bad291545909ddb89af35ab3f6021

Author: Saul Wold <sgw at linux.intel.com>
Date:   Fri Jan 24 11:25:00 2014 -0800

combo-layer: Make directories only if they don't exisit yet

Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 scripts/combo-layer | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/combo-layer b/scripts/combo-layer
index ae97471..9da1d3a 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -194,7 +194,8 @@ def action_init(conf, args):
             dest_dir = repo['dest_dir']
             if dest_dir and dest_dir != ".":
                 extract_dir = os.path.join(os.getcwd(), dest_dir)
-                os.makedirs(extract_dir)
+                if not os.path.exists(extract_dir):
+                    os.makedirs(extract_dir)
             else:
                 extract_dir = os.getcwd()
             file_filter = repo.get('file_filter', "")
@@ -354,7 +355,8 @@ def action_update(conf, args):
 
     import uuid
     patch_dir = "patch-%s" % uuid.uuid4()
-    os.mkdir(patch_dir)
+    if not os.path.exists(patch_dir):
+        os.mkdir(patch_dir)
 
     # Step 1: update the component repos
     if conf.nopull:



More information about the Openembedded-commits mailing list