From e1d01635041fb892851e1f8eb0aecc9781afdaaf Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 8 Jan 2020 14:26:26 -0800 Subject: [PATCH] Display command being executed in each task --- dangerzone/tasks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dangerzone/tasks.py b/dangerzone/tasks.py index 11400aa..f2146f7 100644 --- a/dangerzone/tasks.py +++ b/dangerzone/tasks.py @@ -2,6 +2,7 @@ import subprocess import time import tempfile import os +import pipes from PyQt5 import QtCore, QtWidgets, QtGui @@ -15,8 +16,11 @@ class TaskBase(QtCore.QThread): super(TaskBase, self).__init__() def execute_podman(self, args, watch="stdout"): - print(f"Executing: {' '.join(args)}") - output = "" + args_str = " ".join(pipes.quote(s) for s in args) + print(f"Executing: {args_str}") + output = f"Executing: {args_str}\n\n" + self.update_details.emit(output) + with subprocess.Popen( args, stdin=None,