]> 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: Output whole stderr content as TaskWarriorException on failure
authorTomas Babej <tomasbabej@gmail.com>
Fri, 20 Feb 2015 13:11:55 +0000 (14:11 +0100)
committerTomas Babej <tomasbabej@gmail.com>
Fri, 20 Feb 2015 17:19:10 +0000 (18:19 +0100)
The reason for this change is that TaskWarrior outputs all footnotes and
errors in stderr, and, as a result, we get meaningless errors like:

Configuration override rc.data.location=/tmp/random

tasklib/task.py

index 50384bfbd2805aa04362b0868d94fd9905937d0c..e8e5dfda4a796f789c7696f36c70534cb1bbcebc 100644 (file)
@@ -845,7 +845,7 @@ class TaskWarrior(object):
         stdout, stderr = [x.decode('utf-8') for x in p.communicate()]
         if p.returncode and allow_failure:
             if stderr.strip():
         stdout, stderr = [x.decode('utf-8') for x in p.communicate()]
         if p.returncode and allow_failure:
             if stderr.strip():
-                error_msg = stderr.strip().splitlines()[-1]
+                error_msg = stderr.strip()
             else:
                 error_msg = stdout.strip()
             raise TaskWarriorException(error_msg)
             else:
                 error_msg = stdout.strip()
             raise TaskWarriorException(error_msg)