[python-debian/master 32/36] Make deb822.GpgInfo.from_sequence compatible with Python 3.3.

Stuart Prescott stuart+debian at nanonanonano.net
Mon Oct 8 07:41:24 UTC 2012


---
 lib/debian/deb822.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/debian/deb822.py b/lib/debian/deb822.py
index 04e94c3..be9a15b 100644
--- a/lib/debian/deb822.py
+++ b/lib/debian/deb822.py
@@ -818,7 +818,7 @@ class GpgInfo(dict):
 
         p = subprocess.Popen(args, stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE,
-                             universal_newlines=True)
+                             universal_newlines=False)
         # XXX what to do with exit code?
 
         if isinstance(sequence, bytes):
@@ -827,7 +827,8 @@ class GpgInfo(dict):
             inp = cls._get_full_bytes(sequence)
         out, err = p.communicate(inp)
 
-        return cls.from_output(out, err)
+        return cls.from_output(out.decode('utf-8'),
+                               err.decode('utf-8'))
 
     @staticmethod
     def _get_full_bytes(sequence):
-- 
1.7.2.5





More information about the pkg-python-debian-commits mailing list