]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

TaskWarrior: Only strip trailing whitespace from output
authorTomas Babej <tomasbabej@gmail.com>
Sun, 22 Mar 2015 14:04:35 +0000 (15:04 +0100)
committerTomas Babej <tomasbabej@gmail.com>
Sun, 22 Mar 2015 14:04:37 +0000 (15:04 +0100)
Leading whitespace can be used to center a heading in certain reports.

tasklib/task.py

index b9103d1c309594ecede2fbeb2bfe4252b5635ea2..dd90a28ff1083aab6c58069b73444b95121d93ef 100644 (file)
@@ -912,7 +912,7 @@ class TaskWarrior(object):
             else:
                 error_msg = stdout.strip()
             raise TaskWarriorException(error_msg)
             else:
                 error_msg = stdout.strip()
             raise TaskWarriorException(error_msg)
-        return stdout.strip().split('\n')
+        return stdout.rstrip().split('\n')
 
     def enforce_recurrence(self):
         # Run arbitrary report command which will trigger generation
 
     def enforce_recurrence(self):
         # Run arbitrary report command which will trigger generation