X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/30a5525b762a066b56e6f981c8d79193740419fe..cc9b49c77b30bf4f8aed8fd84d73c49017615a9e:/tasklib/task.py?ds=sidebyside diff --git a/tasklib/task.py b/tasklib/task.py index 9a02f35..0546e44 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -25,7 +25,6 @@ class Task(object): def __init__(self, warrior, data={}): self.warrior = warrior self._data = data - print data self._modified_fields = set() def __unicode__(self): @@ -255,7 +254,10 @@ class TaskWarrior(object): stderr=subprocess.PIPE) stdout, stderr = p.communicate() if p.returncode: - error_msg = stderr.strip().splitlines()[-1] + if stderr.strip(): + error_msg = stderr.strip().splitlines()[-1] + else: + error_msg = stdout.strip() raise TaskWarriorException(error_msg) return stdout.strip().split('\n')