aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2016-10-12 09:39:34 +0000
committerPjotr Prins2016-10-12 09:39:34 +0000
commit7603d9ca6ffe0997ff0b99dc854620f8857155e0 (patch)
treebadc6ba51ae4edc7543cc89e07dc89c94b249e50 /wqflask
parent40be6ebd58f50dd61874d3abd2d78037f365f215 (diff)
downloadgenenetwork2-7603d9ca6ffe0997ff0b99dc854620f8857155e0.tar.gz
JS: check for file explicitely
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/tools.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 77cb6ac5..0ee1146e 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -121,9 +121,14 @@ def assert_writable_dir(dir):
fh.close()
os.remove(fn)
except IOError:
- raise Exception('Unable to write test.txt to directory ' + dir )
+ raise Exception('Unable to write test.txt to directory ' + dir)
return dir
+def assert_file(fn):
+ if not valid_file(fn):
+ raise Exception('Unable to find file '+fn)
+ return fn
+
def mk_dir(dir):
if not valid_path(dir):
os.makedirs(dir)
@@ -234,4 +239,5 @@ if os.environ.get('WQFLASK_OVERRIDES'):
logger.debug(OVERRIDES)
assert_dir(get_setting("JS_BIODALLIANCE"))
+assert_file(get_setting("JS_BIODALLIANCE")+"/build/dalliance-all.js")
assert_dir(get_setting("JS_TWITTER_POST_FETCHER"))