X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/ac41f90217fb7a3d36d405dbc77554aea7a6b15b..7f66ed3ea23e33750c43bf4abc6092a6e2c5a584:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index 7d1bbe4..b6c3d09 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -372,8 +372,11 @@ class Task(TaskResource): def add_field(field): # Add the output of format_field method to args list (defaults to - # field:value) - format_default = lambda k: "{0}:'{1}'".format(k, self._data[k] or '') + # field:'value') + format_default = lambda k: "{0}:{1}".format(k, + "'{0}'".format(self._data[k]) + if self._data[k] is not None + else '') format_func = getattr(self, 'format_{0}'.format(field), lambda: format_default(field)) args.append(format_func()) @@ -570,6 +573,7 @@ class TaskWarrior(object): self.config = { 'data.location': os.path.expanduser(data_location), 'confirmation': 'no', + 'dependency.confirmation': 'no', # See TW-1483 or taskrc man page } self.tasks = TaskQuerySet(self) self.version = self._get_version()