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)