From: Paul Varner Date: Thu, 14 Jul 2011 18:29:09 +0000 (-0500) Subject: Fix call_program to actually return stdout as string under py3k X-Git-Tag: gentoolkit-0.3.0.5~21 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b150d5882b03a35a9b83707e4ed505446ab06b8a;p=gentoolkit.git Fix call_program to actually return stdout as string under py3k --- diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py index 43be461..a2c317e 100644 --- a/pym/gentoolkit/revdep_rebuild/stuff.py +++ b/pym/gentoolkit/revdep_rebuild/stuff.py @@ -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)