diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-09-04 07:53:52 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-09-04 07:53:52 +0000 |
| commit | 3febddec12dfe05fea5f388274a991f8faecab48 (patch) | |
| tree | 37202cf6b2c6e3dc7b7c7e1e1010401c91b01436 /lib/python/Tools | |
| parent | 5d17d6c6fdcb54f655825716084fb4bea871f50f (diff) | |
| download | enigma2-3febddec12dfe05fea5f388274a991f8faecab48.tar.gz enigma2-3febddec12dfe05fea5f388274a991f8faecab48.zip | |
allow recursive (-p) directory creation
Diffstat (limited to 'lib/python/Tools')
| -rw-r--r-- | lib/python/Tools/Directories.py | 7 |
1 files 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: |
