mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Add missing reset ANSI sequence
Do not forget to reset the red text once we print an error string to the terminal
This commit is contained in:
parent
9768714b4a
commit
77f4b8115c
1 changed files with 3 additions and 3 deletions
|
@ -53,12 +53,12 @@ class IsolationProvider(ABC):
|
||||||
self, document: Document, error: bool, text: str, percentage: float
|
self, document: Document, error: bool, text: str, percentage: float
|
||||||
) -> None:
|
) -> None:
|
||||||
s = Style.BRIGHT + Fore.YELLOW + f"[doc {document.id}] "
|
s = Style.BRIGHT + Fore.YELLOW + f"[doc {document.id}] "
|
||||||
s += Fore.CYAN + f"{percentage}% "
|
s += Fore.CYAN + f"{percentage}% " + Style.RESET_ALL
|
||||||
if error:
|
if error:
|
||||||
s += Style.RESET_ALL + Fore.RED + text
|
s += Fore.RED + text + Style.RESET_ALL
|
||||||
log.error(s)
|
log.error(s)
|
||||||
else:
|
else:
|
||||||
s += Style.RESET_ALL + text
|
s += text
|
||||||
log.info(s)
|
log.info(s)
|
||||||
|
|
||||||
if self.progress_callback:
|
if self.progress_callback:
|
||||||
|
|
Loading…
Reference in a new issue