mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Refactor logic for readability
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
18857a2775
commit
a16eb7cc05
1 changed files with 6 additions and 4 deletions
|
|
@ -49,11 +49,13 @@ class Terminal:
|
|||
"""
|
||||
|
||||
from openpype.lib import env_value_to_bool
|
||||
use_colors = not env_value_to_bool(
|
||||
"OPENPYPE_LOG_NO_COLORS", default=not Terminal.use_colors
|
||||
log_no_colors = env_value_to_bool(
|
||||
"OPENPYPE_LOG_NO_COLORS", default=None
|
||||
)
|
||||
if not use_colors:
|
||||
Terminal.use_colors = use_colors
|
||||
if log_no_colors is not None:
|
||||
Terminal.use_colors = not log_no_colors
|
||||
|
||||
if not Terminal.use_colors:
|
||||
Terminal._initialized = True
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue