From 3febddec12dfe05fea5f388274a991f8faecab48 Mon Sep 17 00:00:00 2001 From: Andreas Frisch Date: Thu, 4 Sep 2008 07:53:52 +0000 Subject: [PATCH] allow recursive (-p) directory creation --- lib/python/Tools/Directories.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/python/Tools/Directories.py b/lib/python/Tools/Directories.py index 576d2773..8a35f1da 100644 --- a/lib/python/Tools/Directories.py +++ b/lib/python/Tools/Directories.py @@ -126,9 +126,12 @@ def resolveFilename(scope, base = "", path_prefix = None): def pathExists(path): return os_path.exists(path) -def createDir(path): +def createDir(path, makeParents = False): try: - mkdir(path) + if makeParents: + makedirs(path) + else: + mkdir(path) except: ret = 0 else: -- 2.30.2