From: Joerg Jaspert Date: Fri, 30 Oct 2009 11:18:32 +0000 (+0100) Subject: Merge commit 'lamby/master' into merge X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=c3c282cac9150947e08663ed3d2bdf2f9685abf9;hp=0b721f7bf2a1b98866454f7eb54854aec5251550;p=dak.git Merge commit 'lamby/master' into merge * commit 'lamby/master': Revert "remove an unneeded linewrap" - not needed anymore. Strip trailing newline, just like getstatusoutput Signed-off-by: Joerg Jaspert --- diff --git a/dak/rm.py b/dak/rm.py index 00671f60..69b35971 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -492,7 +492,7 @@ def main (): game_over() whoami = utils.whoami() - date = commands.getoutput('date -R').strip() + date = commands.getoutput('date -R') # Log first; if it all falls apart I want a record that we at least tried. logfile = utils.open_file(cnf["Rm::LogFile"], 'a') 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