diff options
-rw-r--r-- | tools/buildman/builder.py | 2 | ||||
-rw-r--r-- | tools/buildman/builderthread.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 1b6517b..8155c16 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -1141,7 +1141,7 @@ class Builder: self._verbose = verbose self.ResetResultSummary(board_selected) - builderthread.Mkdir(self.base_dir) + builderthread.Mkdir(self.base_dir, parents = True) self._PrepareWorkingSpace(min(self.num_threads, len(board_selected)), commits is not None) self._PrepareOutputSpace() diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 261919f..a9cf68a 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 |