mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -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 argparse
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import warnings
|
||||||
|
|
||||||
debug_env = os.getenv('DEBUG', 'false').lower()
|
debug_env = os.getenv('DEBUG', 'false').lower()
|
||||||
if debug_env != '1' and debug_env != 'true':
|
if debug_env != '1' and debug_env != 'true':
|
||||||
logging.disable(logging.WARNING)
|
logging.disable(logging.WARNING)
|
||||||
|
warnings.filterwarnings('ignore')
|
||||||
|
|
||||||
from prompt_toolkit import print_formatted_text
|
from prompt_toolkit import print_formatted_text
|
||||||
from prompt_toolkit.formatted_text import HTML
|
from prompt_toolkit.formatted_text import HTML
|
||||||
|
|||||||
Reference in New Issue
Block a user