summaryrefslogtreecommitdiffstats
path: root/tools/buildman/builderthread.py
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-08-19 10:22:39 +0200
committerSimon Glass <sjg@chromium.org>2014-09-09 16:38:32 -0600
commitf3d015cb4a84e4a7bb37e9963e4e8e97b48b7d68 (patch)
treeda906e383dc6d66b21b989d03fb2414ea0b38424 /tools/buildman/builderthread.py
parent1f7278851ea359063dabc235ff690a5010467956 (diff)
downloadtalos-obmc-uboot-f3d015cb4a84e4a7bb37e9963e4e8e97b48b7d68.tar.gz
talos-obmc-uboot-f3d015cb4a84e4a7bb37e9963e4e8e97b48b7d68.zip
buildman: Create parent directories as necessary
When creating build directories also create parents as necessary. This fixes a failure when building a hierarchical branch (i.e. foo/bar). Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'tools/buildman/builderthread.py')
-rw-r--r--tools/buildman/builderthread.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 261919f127..a9cf68a801 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -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
OpenPOWER on IntegriCloud