mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 15:32:04 +00:00
suppress logs for dashboards (#3522)
Co-authored-by: Chavithra <chavithra@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import os
|
||||
import subprocess # nosec
|
||||
from typing import List
|
||||
|
||||
import openbb_terminal.config_terminal as cfg
|
||||
from openbb_terminal import feature_flags as obbff
|
||||
from openbb_terminal.custom_prompt_toolkit import NestedCompleter
|
||||
from openbb_terminal.decorators import log_start_end
|
||||
@@ -159,12 +160,14 @@ def create_call_voila(other_args: List[str], name: str, filename: str = None) ->
|
||||
if ns_parser.dark and not ns_parser.jupyter:
|
||||
args += "--theme=dark"
|
||||
if ns_parser.input or response.lower() == "y":
|
||||
cfg.LOGGING_SUPPRESS = True
|
||||
subprocess.Popen(
|
||||
f"{cmd} {file} {args}",
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True, # nosec
|
||||
)
|
||||
cfg.LOGGING_SUPPRESS = False
|
||||
else:
|
||||
console.print(f"Type: {cmd} voila/{file}\ninto a terminal to run.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user