]> err.no Git - dak/commitdiff
Strip trailing newline, just like getstatusoutput
authorChris Lamb <lamby@debian.org>
Fri, 30 Oct 2009 11:16:51 +0000 (11:16 +0000)
committerChris Lamb <lamby@debian.org>
Fri, 30 Oct 2009 11:16:51 +0000 (11:16 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
daklib/utils.py

index 29b6032a434cdba3225083c96e5c5207fde21bc7..0b9fa8416ac33099f71ed828ebdd1f9913fa0208 100755 (executable)
@@ -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