From 31a1c126185adb747028d035717ad72728a52b0e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 24 Feb 2016 11:25:10 +0000 Subject: -a [PATCH 038/100] Fix compile errors --- wqflask/utility/tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wqflask/utility') 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): -- cgit v1.2.3