[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: Popen - universal_newlines=True. Py2, Py3 compatible
Holger Levsen
gitlab at salsa.debian.org
Wed Jul 10 16:45:52 BST 2019
Holger Levsen pushed to branch develop at Debian / piuparts
Commits:
669aad1f by Herbert Parentes Fortes Neto at 2019-07-10T15:43:53Z
Popen - universal_newlines=True. Py2, Py3 compatible
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1ee99023 by Holger Levsen at 2019-07-10T15:45:42Z
add d/changelog entry for Herbert
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- debian/changelog
- piuparts.py
Changes:
=====================================
debian/changelog
=====================================
@@ -1,5 +1,9 @@
piuparts (1.0.2) UNRELEASED; urgency=medium
+ [ Herbert Parentes Fortes Neto ]
+ * piuparts.py: use Popen with universal_newlines=True. Py2, Py3 compatible.
+
+ [ Holger Levsen ]
* Bump standards version to 4.4.0, no changes needed.
-- Holger Levsen <holger at debian.org> Sun, 07 Jul 2019 17:15:41 +0200
=====================================
piuparts.py
=====================================
@@ -131,7 +131,8 @@ class DefaultsFactory:
def guess_flavor(self):
p = subprocess.Popen(["lsb_release", "-i", "-s"],
- stdout=subprocess.PIPE)
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
stdout, stderr = p.communicate()
return stdout.strip().lower()
@@ -553,7 +554,8 @@ def run(command, ignore_errors=False, timeout=0):
env["PIUPARTS_OBJECTS"] = ' '.join(str(vobject) for vobject in settings.testobjects)
devnull = open('/dev/null', 'r')
p = subprocess.Popen(command, env=env, stdin=devnull,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ universal_newlines=True)
output = ""
excessive_output = False
if timeout > 0:
@@ -1033,7 +1035,8 @@ class Chroot:
proxy = None
pat = re.compile(r"^Acquire::http::Proxy\s+\"([^\"]+)\"", re.I)
p = subprocess.Popen(["apt-config", "dump"],
- stdout=subprocess.PIPE)
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
stdout, _ = p.communicate()
if stdout:
for line in stdout.split("\n"):
@@ -1697,7 +1700,8 @@ class Chroot:
seen = []
while True:
p = subprocess.Popen(["lsof", "-t", "+D", self.name],
- stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ universal_newlines=True)
stdout, _ = p.communicate()
if not stdout:
break
@@ -1767,7 +1771,8 @@ class Chroot:
if not os.path.exists(dev_ptmx_rel_path):
os.mknod(dev_ptmx_rel_path, 0666 | stat.S_IFCHR, os.makedev(5, 2))
self.mount(self.relative("dev/pts/ptmx"), "/dev/ptmx", opts="bind", no_mkdir=True)
- p = subprocess.Popen(["tty"], stdout=subprocess.PIPE)
+ p = subprocess.Popen(["tty"], stdout=subprocess.PIPE,
+ universal_newlines=True)
stdout, _ = p.communicate()
current_tty = stdout.strip()
if p.returncode == 0 and os.path.exists(current_tty):
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/93f8d818ce907cdd45b6795bf9a68065792892ca...1ee9902312ba49ff7eee836af5f5cc6d1cd68da8
--
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/93f8d818ce907cdd45b6795bf9a68065792892ca...1ee9902312ba49ff7eee836af5f5cc6d1cd68da8
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/20190710/56d8d11a/attachment-0001.html>
More information about the Piuparts-devel
mailing list