← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:py3-get-arch-bits into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:py3-get-arch-bits into launchpad-buildd:master.

Commit message:
Fix get_arch_bits for Python 3

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383448
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:py3-get-arch-bits into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 1995088..a2dc9e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ launchpad-buildd (190) UNRELEASED; urgency=medium
   * Treat build logs as binary files.
   * Treat build output files as binary files.
   * Treat intltool-related files as binary files.
+  * Fix get_arch_bits for Python 3.
 
  -- Colin Watson <cjwatson@xxxxxxxxxx>  Tue, 28 Apr 2020 10:19:27 +0100
 
diff --git a/lpbuildd/util.py b/lpbuildd/util.py
index aeb13ac..052da2c 100644
--- a/lpbuildd/util.py
+++ b/lpbuildd/util.py
@@ -21,7 +21,7 @@ def get_arch_bits(arch):
         env.pop("DEB_HOST_ARCH_BITS", None)
         bits = subprocess.check_output(
             ["dpkg-architecture", "-a%s" % arch, "-qDEB_HOST_ARCH_BITS"],
-            env=env).rstrip("\n")
+            env=env, universal_newlines=True).rstrip("\n")
         if bits == "32":
             return 32
         elif bits == "64":