diff options
author | Frederick Muriuki Muriithi | 2023-06-22 09:42:36 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-06-22 09:42:36 +0300 |
commit | 11d5c309ce70ba0e5a4c53e949cb664412102a70 (patch) | |
tree | 6ae3a0d36e667b9a4b7b458a2ff905fe8900bf06 /wqflask | |
parent | 9a3d761cbde705204db64bc7e70e2defc02f2c64 (diff) | |
download | genenetwork2-11d5c309ce70ba0e5a4c53e949cb664412102a70.tar.gz |
Remove unused 'OVERRIDES'
Remove the unused 'OVERRIDES' global variable and the associated code
that currently does nothing of value.
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/utility/tools.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 5b3e9413..00b8368c 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -11,8 +11,6 @@ from wqflask import app import logging logger = logging.getLogger(__name__) -OVERRIDES = {} - def app_set(command_id, value): """Set application wide value""" @@ -56,16 +54,14 @@ def get_setting(command_id, guess=None): # print("Looking for "+command_id+"\n") command = value(os.environ.get(command_id)) if command is None or command == "": - command = OVERRIDES.get(command_id) # currently not in use + # ---- Check whether setting exists in app + command = value(app.config.get(command_id)) if command is None: - # ---- Check whether setting exists in app - command = value(app.config.get(command_id)) - if command is None: - command = value(guess) - if command is None or command == "": - # print command - raise Exception( - command_id + ' setting unknown or faulty (update default_settings.py?).') + command = value(guess) + if command is None or command == "": + # print command + raise Exception( + command_id + ' setting unknown or faulty (update default_settings.py?).') # print("Set "+command_id+"="+str(command)) return command |