chiark / gitweb /
FDroidPopen: return str again
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 4 Jan 2016 16:55:37 +0000 (17:55 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 10 Mar 2016 16:43:37 +0000 (16:43 +0000)
In the future we might want to instead return bytes, but for now the
easiest for the port to python3 is to continue to return str.

fdroidserver/common.py

index e5b38c674da6b3e7f32ace551c9135baf5fedb30..ed8fa1f99cec5b15f38d5655392c8e1f4f1f8d30 100644 (file)
@@ -1672,9 +1672,9 @@ def FDroidPopen(commands, cwd=None, output=True, stderr_to_stdout=True):
             line = stdout_queue.get()
             if output and options.verbose:
                 # Output directly to console
-                sys.stderr.write(line)
+                sys.stderr.buffer.write(line)
                 sys.stderr.flush()
-            result.output += line
+            result.output += line.decode('utf-8')
 
         time.sleep(0.1)