mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Switch subprocess bullet character
This commit is contained in:
parent
04dcf72313
commit
9c645beaef
3 changed files with 5 additions and 5 deletions
|
@ -20,9 +20,9 @@ def exec_container(global_common, args):
|
||||||
output += line.decode()
|
output += line.decode()
|
||||||
|
|
||||||
# Hack to add colors to the command executing
|
# Hack to add colors to the command executing
|
||||||
if line.startswith(b"\xe2\x80\xa3 "):
|
if line.startswith(b"\xc2\xbb "):
|
||||||
print(
|
print(
|
||||||
Fore.WHITE + "\x10 " + Fore.LIGHTCYAN_EX + line.decode()[2:],
|
Fore.YELLOW + "\xbb " + Fore.LIGHTCYAN_EX + line.decode()[2:],
|
||||||
end="",
|
end="",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -25,7 +25,7 @@ def exec_container(args):
|
||||||
args = [container_runtime] + args
|
args = [container_runtime] + args
|
||||||
|
|
||||||
args_str = " ".join(pipes.quote(s) for s in args)
|
args_str = " ".join(pipes.quote(s) for s in args)
|
||||||
print("\x10 " + args_str)
|
print("\xbb " + args_str)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
with subprocess.Popen(
|
with subprocess.Popen(
|
||||||
|
|
|
@ -450,7 +450,7 @@ class GlobalCommon(object):
|
||||||
|
|
||||||
# Execute dangerzone-container
|
# Execute dangerzone-container
|
||||||
args_str = " ".join(pipes.quote(s) for s in args)
|
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(
|
return subprocess.Popen(
|
||||||
args,
|
args,
|
||||||
startupinfo=self.get_subprocess_startupinfo(),
|
startupinfo=self.get_subprocess_startupinfo(),
|
||||||
|
@ -477,7 +477,7 @@ class GlobalCommon(object):
|
||||||
) as p:
|
) as p:
|
||||||
stdout_data, _ = p.communicate()
|
stdout_data, _ = p.communicate()
|
||||||
lines = stdout_data.split(b"\n")
|
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:])
|
stdout_data = b"\n".join(lines[1:])
|
||||||
|
|
||||||
# The user canceled, or permission denied
|
# The user canceled, or permission denied
|
||||||
|
|
Loading…
Reference in a new issue