From: Chris Lamb Date: Fri, 30 Oct 2009 11:16:51 +0000 (+0000) Subject: Strip trailing newline, just like getstatusoutput X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=09f585a29f41adc48cdca053a6b4cce91fae84e8;p=dak.git Strip trailing newline, just like getstatusoutput Signed-off-by: Chris Lamb --- diff --git a/daklib/utils.py b/daklib/utils.py index 29b6032a..0b9fa841 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -73,6 +73,9 @@ def dak_getstatusoutput(cmd): output = "".join(pipe.stdout.readlines()) + if output[-1:] == '\n': + output = output[:-1] + ret = pipe.wait() if ret is None: ret = 0