-
Committer:
Colin Watson
-
Date:
2012-05-03 12:26:22 UTC
-
Revision ID:
cjwatson@canonical.com-20120503122622-1pqng262csumnswx
As a general rule, open subprocesses with universal_newlines=True when
expecting to read text from them. This has no effect on Python 2
(aside from \r\n conversion and the like, which is mostly a no-op for
us), but causes Python 3 to read str rather than bytes. The
exceptions at the moment are debconf-communicator subprocesses, where
debconf expects to read binary data and deal with encoding itself, and
debconf-copydb subprocesses, which return mixed-encoding data that
needs to be handled specially.