diff options
author | BonfaceKilz | 2021-02-12 22:31:25 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-02-12 22:31:25 +0300 |
commit | 9dd23ef8c8ed003be130c212374ffa71f230c463 (patch) | |
tree | 0a97e37968e143129002c1a9daf5390a47358b75 /gn3/file_utils.py | |
parent | adb9a6e3d570c86cf902d6293b30fc1f0f27df82 (diff) | |
download | genenetwork3-9dd23ef8c8ed003be130c212374ffa71f230c463.tar.gz |
Add configuration file for the project
Diffstat (limited to 'gn3/file_utils.py')
-rw-r--r-- | gn3/file_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/file_utils.py b/gn3/file_utils.py index d6e1c66..a6929e1 100644 --- a/gn3/file_utils.py +++ b/gn3/file_utils.py @@ -5,6 +5,7 @@ import os from functools import partial from typing import Dict +from gn3.settings import APP_DEFAULTS def get_dir_hash(directory: str) -> str: @@ -30,7 +31,8 @@ ENVIRON_VAR/ROOT_DIR/FILE_NAME does not exist, raise an exception. Otherwise return ENVIRON_VAR/ROOT_DIR/FILE_NAME. """ - _dir = os.environ.get(environ_var) + _dir = APP_DEFAULTS.get(environ_var, + os.environ.get(environ_var)) if _dir: _file = os.path.join(_dir, root_dir, file_name) if os.path.isfile(_file): |