[master 15/30] Return a string when calling a program (#1014220)

M4rtinK installerbot-noreply at redhat.com
Mon Jun 1 14:04:32 UTC 2015


From: Martin Kolman <mkolman at redhat.com>

In the places where Anaconda expects the program to returna string.
---
 pyanaconda/iutil.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index d34bfcf..c059629 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -273,6 +273,7 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou
             if binary_output:
                 output_lines = [output_string]
             else:
+                output_string = output_string.decode("utf-8")
                 if output_string[-1] != "\n":
                     output_string = output_string + "\n"
                 output_lines = output_string.splitlines(True)
@@ -431,7 +432,7 @@ def __del__(self):
 
         def next(self):
             # Read the next line, blocking if a line is not yet available
-            line = self._proc.stdout.readline()
+            line = self._proc.stdout.readline().decode("utf-8")
             if line == '':
                 # Output finished, wait for the process to end
                 self._proc.communicate()


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/0e2327b9db00b4e57a1645982e8c4285a5f32b7e


More information about the anaconda-patches mailing list