From 9c645beaefb855f4d3cb7333b0fd6b28c3e6fefc Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 17 Jun 2021 11:18:13 -0700 Subject: [PATCH] Switch subprocess bullet character --- dangerzone/cli.py | 4 ++-- dangerzone/container.py | 2 +- dangerzone/global_common.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dangerzone/cli.py b/dangerzone/cli.py index 0a0b6b5..5cb9637 100644 --- a/dangerzone/cli.py +++ b/dangerzone/cli.py @@ -20,9 +20,9 @@ def exec_container(global_common, args): output += line.decode() # Hack to add colors to the command executing - if line.startswith(b"\xe2\x80\xa3 "): + if line.startswith(b"\xc2\xbb "): print( - Fore.WHITE + "\x10 " + Fore.LIGHTCYAN_EX + line.decode()[2:], + Fore.YELLOW + "\xbb " + Fore.LIGHTCYAN_EX + line.decode()[2:], end="", ) else: diff --git a/dangerzone/container.py b/dangerzone/container.py index 5547b7c..36e9fd3 100644 --- a/dangerzone/container.py +++ b/dangerzone/container.py @@ -25,7 +25,7 @@ def exec_container(args): args = [container_runtime] + args args_str = " ".join(pipes.quote(s) for s in args) - print("\x10 " + args_str) + print("\xbb " + args_str) sys.stdout.flush() with subprocess.Popen( diff --git a/dangerzone/global_common.py b/dangerzone/global_common.py index 60ac783..5b5c634 100644 --- a/dangerzone/global_common.py +++ b/dangerzone/global_common.py @@ -450,7 +450,7 @@ class GlobalCommon(object): # Execute dangerzone-container args_str = " ".join(pipes.quote(s) for s in args) - print(Fore.YELLOW + "\x10 " + Fore.CYAN + args_str) + print(Fore.YELLOW + "\xbb " + Fore.CYAN + args_str) return subprocess.Popen( args, startupinfo=self.get_subprocess_startupinfo(), @@ -477,7 +477,7 @@ class GlobalCommon(object): ) as p: stdout_data, _ = p.communicate() lines = stdout_data.split(b"\n") - if b"\x10 " in lines[0]: + if b"\xbb " in lines[0]: stdout_data = b"\n".join(lines[1:]) # The user canceled, or permission denied