]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/buildman/builderthread.py
buildman: Create parent directories as necessary
[karo-tx-uboot.git] / tools / buildman / builderthread.py
index 261919f127fd6a6b22733ab76e7ee41d91d857a0..a9cf68a8016c4ea9c066ea9527986d56f0465266 100644 (file)
@@ -12,14 +12,17 @@ import threading
 import command
 import gitutil
 
-def Mkdir(dirname):
+def Mkdir(dirname, parents = False):
     """Make a directory if it doesn't already exist.
 
     Args:
         dirname: Directory to create
     """
     try:
-        os.mkdir(dirname)
+        if parents:
+            os.makedirs(dirname)
+        else:
+            os.mkdir(dirname)
     except OSError as err:
         if err.errno == errno.EEXIST:
             pass