mambabase.py: fix linebreaks in command output displaying

This commit is contained in:
Silvan Calarco 2022-06-19 11:57:17 +02:00
parent 38f5e7f875
commit 1c726d62bb

View File

@ -107,11 +107,11 @@ class InstallThread(QtCore.QThread):
if result.returncode == 0:
if result.stdout:
self.updateProgressSignal.emit({
'details': result.stdout.decode('UTF-8')})
'details': result.stdout.decode('UTF-8').replace('\n', '<br/>')})
else:
if result.stderr:
self.updateProgressSignal.emit({
'details': result.stderr.decode('UTF-8')})
'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')})
# Perform system update
self.updateProgressSignal.emit({ 'value': 10,
@ -123,11 +123,11 @@ class InstallThread(QtCore.QThread):
if result.returncode == 0:
if result.stdout:
self.updateProgressSignal.emit({
'details': result.stdout.decode('UTF-8')})
'details': result.stdout.decode('UTF-8').replace('\n', '<br/>')})
else:
if result.stderr:
self.updateProgressSignal.emit({
'details': result.stderr.decode('UTF-8')})
'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')})
self.updateProgressSignal.emit({ 'value': 20 })
@ -189,11 +189,11 @@ class InstallThread(QtCore.QThread):
if result.returncode == 0:
if result.stdout:
self.updateProgressSignal.emit({
'details': result.stdout.decode('UTF-8')})
'details': result.stdout.decode('UTF-8').replace('\n', '<br/>')})
else:
if result.stderr:
self.updateProgressSignal.emit({
'details': result.stderr.decode('UTF-8')})
'details': result.stderr.decode('UTF-8').replace('\n', '<br/>')})
# Finished