about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-05 09:40:21 +0300
committerzsloan2023-07-05 11:51:55 -0500
commit9e1902f0bdff015e504134e0572f9a546966d7d5 (patch)
treeba5fc8723b32c5f918961bbc5da941267a622936
parent09564a603ede85c821ee12e2cbaeab0776ea9352 (diff)
downloadgenenetwork2-9e1902f0bdff015e504134e0572f9a546966d7d5.tar.gz
Config: Remove unused `OVERRIDES`
The `OVERRIDES` variable has no actual use in the application,
therefore, this commit removes it and its dependent code.
-rw-r--r--wqflask/utility/tools.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 5b3e9413..2b1f4b8f 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -56,16 +56,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
 
@@ -244,7 +242,6 @@ def show_settings():
     log_level = getattr(logging, LOG_LEVEL.upper())
     logging.basicConfig(level=log_level)
 
-    logger.info(OVERRIDES)
     logger.info(BLUE + "Mr. Mojo Risin 2" + ENDC)
     keylist = list(app.config.keys())
     print("runserver.py: ****** Webserver configuration - k,v pairs from app.config ******",