]> git.decadent.org.uk Git - dak.git/commitdiff
Merge branch 'merge'
authorJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 11:19:01 +0000 (12:19 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 30 Oct 2009 11:19:01 +0000 (12:19 +0100)
* merge:
  Revert "remove an unneeded linewrap" - not needed anymore.
  Strip trailing newline, just like getstatusoutput

dak/rm.py
daklib/utils.py

index 00671f6071859fd14552266c5b10489e647e34a9..69b35971db1c0d223d5b560c1e82e9c9804355de 100755 (executable)
--- 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')
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