Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress logs for dashboards #3522

Merged
merged 3 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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