diff options
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 c28c617a..82ef136f 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) @@ -235,4 +240,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") |