[Piuparts-devel] [Git][debian/piuparts][develop] piupartslib/conf.py: decode subprocess.Popen().stdout
Holger Levsen
gitlab at salsa.debian.org
Wed Dec 25 22:19:35 GMT 2019
Holger Levsen pushed to branch develop at Debian / piuparts
Commits:
fecdaba6 by Nis Martensen at 2019-12-25T21:39:26Z
piupartslib/conf.py: decode subprocess.Popen().stdout
subprocess.Popen().stdout is a byte string in python3. We need to decode
it since we want a unicode string here.
- - - - -
1 changed file:
- piupartslib/conf.py
Changes:
=====================================
piupartslib/conf.py
=====================================
@@ -152,7 +152,7 @@ class Config(UserDict):
# Try to figure it out ourselves, using dpkg
p = subprocess.Popen(["dpkg", "--print-architecture"],
stdout=subprocess.PIPE)
- self["arch"] = p.stdout.read().rstrip()
+ self["arch"] = p.stdout.read().decode().rstrip()
return self["arch"]
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/fecdaba6f39213553911ad8f544127641b67a531
--
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/fecdaba6f39213553911ad8f544127641b67a531
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20191225/db30c8fe/attachment.html>
More information about the Piuparts-devel
mailing list