chiark / gitweb /
always parse versions as strings, not bytes
authorHans-Christoph Steiner <hans@eds.org>
Mon, 14 Mar 2016 10:05:06 +0000 (11:05 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 14 Mar 2016 11:49:38 +0000 (12:49 +0100)
commit7039d16046c485d94e1c71705a58368d341f0b3e
treee70a3eeea2e20fd6f0946c8c7d3b7b64f20c97b1
parent20d082dfed10c08a38e0728a3384908916692ccd
always parse versions as strings, not bytes

Fixes a couple errors like:
  File "./makebuildserver", line 30, in vagrant
    out += line
  TypeError: Can't convert 'bytes' object to str implicitly

If universal_newlines=False, the default, then Popen will return bytes if
the newlines in the data do not match the system's newlines.  Setting it to
true enables auto-conversion, and then guarantees that the data is always
str.

"If universal_newlines is True, the file objects stdin, stdout and stderr
are opened as text streams in universal newlines mode, as described above
in Frequently Used Arguments, otherwise they are opened as binary streams."
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
fdroid
fdroidserver/build.py
makebuildserver