[node-patches] Change in ovirt-node[node-3.0]: installer: Fix stderr capturing

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Oct 10 09:50:31 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: installer: Fix stderr capturing
......................................................................

installer: Fix stderr capturing

Change-Id: Ia90a4447ac90f93534771b46f0c8538422732e0e
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/installer/core/progress_page.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/66/20066/1

diff --git a/src/ovirt/node/installer/core/progress_page.py b/src/ovirt/node/installer/core/progress_page.py
index 8e1d765..51dd133 100644
--- a/src/ovirt/node/installer/core/progress_page.py
+++ b/src/ovirt/node/installer/core/progress_page.py
@@ -100,6 +100,8 @@
         log = self.progress_plugin.widgets["log"]
         log_lines = ["Starting ..."]
 
+        captured_stderr = []
+
         try:
             self.ui_thread.call(lambda: log.text("\n".join(log_lines)))
             self.ui_thread.call(lambda: reboot_button.enabled(False))
@@ -123,6 +125,9 @@
                     # therefore we are capturing this
                     self.progress_plugin.dry_or(do_commit)
 
+                    if captured.stderr.getvalue():
+                        captured_stderr.append(captured.stderr.getvalue())
+
                 log_lines[-1] = "%s (Done)" % log_lines[-1]
 
                 def update_ui():
@@ -140,10 +145,9 @@
             self.ui_thread.call(lambda: reboot_button.enabled(True))
             self.ui_thread.call(lambda: app.ui.hotkeys_enabled(True))
 
-        if captured.stderr.getvalue():
-            se = captured.stderr.getvalue()
-            if se:
-                self.ui_thread.call(lambda: log.text("Stderr: %s" % se))
+        if captured_stderr:
+            self.ui_thread.call(lambda: log.text("Stderr: %s" %
+                                                 str(captured_stderr)))
 
     def __build_transaction(self):
         """Determin what kind of transaction to build


-- 
To view, visit http://gerrit.ovirt.org/20066
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia90a4447ac90f93534771b46f0c8538422732e0e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-3.0
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list