diff options
author | Pjotr Prins | 2016-10-31 19:55:37 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-10-31 19:55:37 +0000 |
commit | 0748bb92fe326330114d2051d959fb4d09977e53 (patch) | |
tree | d6bfae4e35baa8b5bc4eed8bd517a130d9ffe95a /wqflask/utility | |
parent | eb4a6942d51f1f69135f95fb14587a6494732eda (diff) | |
parent | ad0c59f2305b5af3f5dd776363dfcaaab4169eb1 (diff) | |
download | genenetwork2-0748bb92fe326330114d2051d959fb4d09977e53.tar.gz |
Merge branch 'pjotr-gn2' into zsloan
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/logger.py | 2 | ||||
-rw-r--r-- | wqflask/utility/tools.py | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/wqflask/utility/logger.py b/wqflask/utility/logger.py index bacb0aa4..128706df 100644 --- a/wqflask/utility/logger.py +++ b/wqflask/utility/logger.py @@ -72,7 +72,7 @@ LOG_LEVEL_DEBUG (NYI). def warning(self,*args): """Call logging.warning for multiple args""" self.collect(self.logger.warning,*args) - self.logger.warning(self.collect(*args)) + # self.logger.warning(self.collect(*args)) def error(self,*args): """Call logging.error for multiple args""" diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index df032e48..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) @@ -233,4 +238,8 @@ if os.environ.get('WQFLASK_OVERRIDES'): OVERRIDES[k] = cmd logger.debug(OVERRIDES) -assert_dir(get_setting("TWITTER_POST_FETCHER_JS_PATH")) +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") |