mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Filter all warnings in CLI when DEBUG is disabled (#11246)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
0e2edb63f5
commit
fbf0429434
@ -7,10 +7,12 @@ This is a simplified version that demonstrates the TUI functionality.
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import warnings
|
||||
|
||||
debug_env = os.getenv('DEBUG', 'false').lower()
|
||||
if debug_env != '1' and debug_env != 'true':
|
||||
logging.disable(logging.WARNING)
|
||||
warnings.filterwarnings('ignore')
|
||||
|
||||
from prompt_toolkit import print_formatted_text
|
||||
from prompt_toolkit.formatted_text import HTML
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user