From e9ee75194dcb6c60ff6b204f6b6ad135d4859628 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Fri, 20 Feb 2015 14:11:55 +0100 Subject: [PATCH 1/1] TaskWarrior: Output whole stderr content as TaskWarriorException on failure 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasklib/task.py b/tasklib/task.py index 50384bf..e8e5dfd 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -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(): - error_msg = stderr.strip().splitlines()[-1] + error_msg = stderr.strip() else: error_msg = stdout.strip() raise TaskWarriorException(error_msg) -- 2.39.2