]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: Make directories only if they don't exisit yet
authorSaul Wold <sgw@linux.intel.com>
Fri, 24 Jan 2014 19:25:00 +0000 (11:25 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Jan 2014 00:48:29 +0000 (00:48 +0000)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/combo-layer

index ae97471d6dc0b74407fa8852b5ce6e88e8e9ef2a..9da1d3a89ec042be007a44f71d75dc0f7f384fa2 100755 (executable)
@@ -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: