From d507bed1b20425e389f7a0aacdea96c27d343a32 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 11 Jun 2007 14:59:18 -0400 Subject: [PATCH] Use universal newlines in getting process output (Trac #44) --- Changelog | 1 + pypungi/pungi.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 29f92bc9..8af150bf 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ * Mon Jun 11 2007 Jesse Keating - Add a install target to make (Trac #37) - Enable the source repo in yum configs (Trac #47) +- Use universal newlines in getting process output (Trac #44) * Fri May 25 2007 Jesse Keating - Handle the cdsize variable correctly diff --git a/pypungi/pungi.py b/pypungi/pungi.py index b4bdfc87..ec58c079 100755 --- a/pypungi/pungi.py +++ b/pypungi/pungi.py @@ -69,7 +69,7 @@ class Pungi: log.info("Running %s" % ' '.join(command)) - p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error) + p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error, universal_newlines=True) (out, err) = p1.communicate() if p1.returncode != 0: log.error("Got an error from %s" % command[0]) @@ -178,7 +178,7 @@ class Pungi: try: p1 = subprocess.Popen(rpm2cpio + extraargs, cwd=docsdir, stdout=subprocess.PIPE) (out, err) = subprocess.Popen(cpio, cwd=docsdir, stdin=p1.stdout, stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() + stderr=subprocess.PIPE, universal_newlines=True).communicate() except: log.error("Got an error from rpm2cpio") log.error(err)