Skip to content

Commit

Permalink
suppress logs for dashboards (#3522)
Browse files Browse the repository at this point in the history
Co-authored-by: Chavithra <chavithra@gmail.com>
  • Loading branch information
hjoaquim and Chavithra authored Nov 22, 2022
1 parent eb0c305 commit d565f7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openbb_terminal/dashboards/dashboards_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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
Expand Down Expand Up @@ -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.")

Expand Down

0 comments on commit d565f7d

Please sign in to comment.