[Merge] lp:~mvo/ubuntu-release-upgrader/lp1071388 into lp:ubuntu-release-upgrader

Barry Warsaw barry at canonical.com
Wed Nov 7 20:47:18 UTC 2012


A couple of quick thoughts: you might want to use "utf-8" instead of "utf8".  It doesn't matter in practice, but better matches what getpreferredencoding() returns.  Very minor nit.

Also, in Python 3, we're generally calling subprocess.Popen(..., universal_newlines=True) now so that you can send unicode to the subprocess instead of bytes.  That may avoid a call to .encode() below.

http://docs.python.org/3/library/subprocess.html#frequently-used-arguments

decoding the results of sys.stdin.readline() also looks a bit suspect to me, since that should already return str instead of bytes.  Are you sure that works?  See also `python3 -h` and the PYTHONIOENCODING envar.
-- 
https://code.launchpad.net/~mvo/ubuntu-release-upgrader/lp1071388/+merge/132851
Your team Ubuntu Core Development Team is subscribed to branch lp:ubuntu-release-upgrader.



More information about the Ubuntu-reviews mailing list