Skip to content

Commit 72a4559

Browse files
committed
backends: Ensure export command is called in the form 'task <filter> export'
This is required for Taskwarrior 2.6.0+ compatibility.
1 parent bdb25d7 commit 72a4559

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tasklib/backends.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def get_task(self, uuid):
329329

330330
def filter_tasks(self, filter_obj):
331331
self.enforce_recurrence()
332-
args = ['export'] + filter_obj.get_filter_params()
332+
args = filter_obj.get_filter_params() + ["export"]
333333
tasks = []
334334
for line in self.execute_command(args):
335335
if line:
@@ -427,8 +427,7 @@ def valid(output):
427427
for key, value in data.items():
428428
taskfilter.add_filter_param(key, value)
429429

430-
output = self.execute_command(['export'] +
431-
taskfilter.get_filter_params())
430+
output = self.execute_command(taskfilter.get_filter_params() + ['export'])
432431

433432
# If more than 1 task has been matched still, raise an exception
434433
if not valid(output):

0 commit comments

Comments
 (0)