aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/tools.py')
-rw-r--r--wqflask/utility/tools.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index c0f6a49a..67c5128a 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -1,3 +1,4 @@
+
# Tools/paths finder resolves external paths from settings and/or environment
# variables
@@ -83,9 +84,10 @@ def assert_dir(dir):
if not valid_path(dir):
raise Exception("ERROR: can not find directory "+dir)
return dir
-
+
def mk_dir(dir):
- os.makedirs(dir)
+ if not valid_path(dir):
+ os.makedirs(dir)
return assert_dir(dir)
def locate(name, subdir=None):