Display command being executed in each task

This commit is contained in:
Micah Lee 2020-01-08 14:26:26 -08:00
parent 2efde47ac4
commit e1d0163504
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -2,6 +2,7 @@ import subprocess
import time import time
import tempfile import tempfile
import os import os
import pipes
from PyQt5 import QtCore, QtWidgets, QtGui from PyQt5 import QtCore, QtWidgets, QtGui
@ -15,8 +16,11 @@ class TaskBase(QtCore.QThread):
super(TaskBase, self).__init__() super(TaskBase, self).__init__()
def execute_podman(self, args, watch="stdout"): def execute_podman(self, args, watch="stdout"):
print(f"Executing: {' '.join(args)}") args_str = " ".join(pipes.quote(s) for s in args)
output = "" print(f"Executing: {args_str}")
output = f"Executing: {args_str}\n\n"
self.update_details.emit(output)
with subprocess.Popen( with subprocess.Popen(
args, args,
stdin=None, stdin=None,