mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
Filter all warnings in CLI when DEBUG is disabled (#11246)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user