Fix call_program to actually return stdout as string under py3k
authorPaul Varner <fuzzyray@gentoo.org>
Thu, 14 Jul 2011 18:29:09 +0000 (13:29 -0500)
committerPaul Varner <fuzzyray@gentoo.org>
Thu, 14 Jul 2011 18:29:09 +0000 (13:29 -0500)
pym/gentoolkit/revdep_rebuild/stuff.py

index 43be46127667693c227a0de9ae2949e0a76858fe..a2c317e0b6a08193472dde09463f862162425226 100644 (file)
@@ -18,9 +18,9 @@ def call_program(args):
        @param, args: arument list to pass to subprocess
        @return str
        '''
-       subp = subprocess.Popen(args, stdout=subprocess.PIPE, \
-                                                               stderr=subprocess.PIPE)
+       subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = subp.communicate()
+       stdout = stdout.decode('utf-8')
        return str(stdout)