[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [win-pv-devel] [PATCH] Don't use universal_newlines=True in subprocess.Popen()
> -----Original Message----- > From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel- > bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Paul Durrant > Sent: 25 September 2014 15:40 > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Paul Durrant > Subject: [win-pv-devel] [PATCH] Don't use universal_newlines=True in > subprocess.Popen() > > For some versions of python this appears to cause corruption of the > output byte string by forcibly decoding with the wrong encoding. > > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> I will apply this fix to all other repo build scripts too. Paul > --- > build.py | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/build.py b/build.py > index c1d01b1..c03803a 100644 > --- a/build.py > +++ b/build.py > @@ -93,11 +93,10 @@ def shell(command, dir): > > sub = subprocess.Popen(' '.join(command), cwd=dir, > stdout=subprocess.PIPE, > - stderr=subprocess.STDOUT, > - universal_newlines=True) > + stderr=subprocess.STDOUT) > > for line in sub.stdout: > - print(line.rstrip()) > + print(line.decode(sys.getdefaultencoding()).rstrip()) > > sub.wait() > > -- > 2.1.1 > > > _______________________________________________ > win-pv-devel mailing list > win-pv-devel@xxxxxxxxxxxxxxxxxxxx > http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |