diff options
author | BonfaceKilz | 2020-07-21 12:36:06 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-07-24 03:47:42 +0300 |
commit | f4e61929d0eb490dbf7e8ddc03a20d42d44b6f5c (patch) | |
tree | b499f2aa299294d24e1792c6c4285a74c1fd01cb /wqflask | |
parent | b362f2586c182c0400bd40e260c9d25240858790 (diff) | |
download | genenetwork2-f4e61929d0eb490dbf7e8ddc03a20d42d44b6f5c.tar.gz |
Add work-around for failed imports in unittest
* wqflask/utility/tools.py: Unittests will use `from wqflask.wqflask import app`
and the gn2 script will use `from wqflask import app`
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/utility/tools.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 77db5d53..37f9d8fe 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -5,7 +5,10 @@ import os import sys import json -from wqflask import app +try: + from wqflask import app +except ImportError: + from wqflask.wqflask import app # Use the standard logger here to avoid a circular dependency import logging |