aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/tools.py
diff options
context:
space:
mode:
authorPjotr Prins2016-10-17 09:56:28 +0000
committerPjotr Prins2016-10-17 09:56:28 +0000
commit4ce94838a8e90636910456415b0a30bb77c88aaf (patch)
tree08b2a273c1fa88b3f42683828d3358ee820ceaaf /wqflask/utility/tools.py
parent141b7336f947bb617802eda785afa5872d82d411 (diff)
parentd79f4ebc6176185660e8e69218a0e2583b8e960f (diff)
downloadgenenetwork2-4ce94838a8e90636910456415b0a30bb77c88aaf.tar.gz
Merge branch 'pjotr-gn2' into chfi
Diffstat (limited to 'wqflask/utility/tools.py')
-rw-r--r--wqflask/utility/tools.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 77cb6ac5..9860f63e 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,7 @@ 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_file(get_setting("JS_BIODALLIANCE")+"/build/worker-all.js")
assert_dir(get_setting("JS_TWITTER_POST_FETCHER"))
+assert_file(get_setting("JS_TWITTER_POST_FETCHER")+"/js/twitterFetcher_min.js")