mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
lower before compare
This commit is contained in:
@@ -214,7 +214,7 @@ def __patch_controller_functions(controller):
|
||||
),
|
||||
]
|
||||
|
||||
if environ.get("DEBUG_MODE", "false") != "true":
|
||||
if str(environ.get("DEBUG_MODE", "false")).lower() != "true":
|
||||
rich.start()
|
||||
patched_function_list = []
|
||||
for patcher in patcher_list:
|
||||
@@ -222,7 +222,7 @@ def __patch_controller_functions(controller):
|
||||
|
||||
yield patched_function_list
|
||||
|
||||
if environ.get("DEBUG_MODE", "false") != "true":
|
||||
if str(environ.get("DEBUG_MODE", "false")).lower() != "true":
|
||||
rich.stop()
|
||||
for patcher in patcher_list:
|
||||
patcher.stop()
|
||||
@@ -319,7 +319,7 @@ def build_controller_choice_map(controller) -> dict:
|
||||
argument_parser=argument_parser
|
||||
)
|
||||
except Exception as exception:
|
||||
if environ.get("DEBUG_MODE", "false") == "true":
|
||||
if str(environ.get("DEBUG_MODE", "false")).lower() == "true":
|
||||
raise Exception(
|
||||
f"On command : `{command}`.\n{str(exception)}"
|
||||
) from exception
|
||||
|
||||
@@ -60,7 +60,7 @@ def log_start_end(func=None, log=None):
|
||||
extra={"func_name_override": func.__name__},
|
||||
)
|
||||
|
||||
if os.environ.get("DEBUG_MODE") == "true":
|
||||
if str(os.environ.get("DEBUG_MODE")).lower() == "true":
|
||||
value = func(*args, **kwargs)
|
||||
log.info("END", extra={"func_name_override": func.__name__})
|
||||
return value
|
||||
|
||||
@@ -195,7 +195,7 @@ class PortfolioEngine:
|
||||
|
||||
# Load transactions from file
|
||||
if path.endswith(".xlsx"):
|
||||
if environ.get("DEBUG_MODE", "false") != "true":
|
||||
if str(environ.get("DEBUG_MODE", "false")).lower() != "true":
|
||||
warnings.filterwarnings(
|
||||
"ignore", category=UserWarning, module="openpyxl"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user