From 445cd95d1779709673857c36b752afa6327afff1 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 17 Oct 2020 21:01:11 -0700 Subject: Improve ANSI support and --no-color (#10537) * Improve ANSI support and --no-color * tweak when levelname gets stripped of ansi * sync with latest milc * make questions work with both milc versions * pyformat --- lib/python/qmk/questions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/python/qmk/questions.py') diff --git a/lib/python/qmk/questions.py b/lib/python/qmk/questions.py index 27f43ac1e9..865c6bbdc5 100644 --- a/lib/python/qmk/questions.py +++ b/lib/python/qmk/questions.py @@ -1,7 +1,12 @@ """Functions to collect user input. """ -from milc import cli, format_ansi +from milc import cli + +try: + from milc import format_ansi +except ImportError: + from milc.ansi import format_ansi def yesno(prompt, *args, default=None, **kwargs): -- cgit v1.2.3