From 0b4824fc72c2de0c1c4738c31d0d30935393a6ec Mon Sep 17 00:00:00 2001 From: Rob Golding Date: Wed, 15 May 2013 21:19:44 +0100 Subject: [PATCH] Fix mismatched parentheses bug --- tasklib/task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasklib/task.py b/tasklib/task.py index 80f08e9..4681418 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -100,7 +100,7 @@ class TaskFilter(object): self.filter_params.append('{0}:{1}'.format(key, value)) def get_filter_params(self): - return ['({})'.format(f) for f in self.filter_params if f] + return [f for f in self.filter_params if f] def clone(self): c = self.__class__() @@ -175,7 +175,7 @@ class TaskQuerySet(object): """ Fetch the tasks which match the current filters. """ - return self.warrior._execute_filter(self.filter_obj) + return self.warrior.filter_tasks(self.filter_obj) def all(self): """ @@ -243,8 +243,8 @@ class TaskWarrior(object): raise TaskWarriorException(stderr.strip()) return stdout.strip().split('\n') - def _execute_filter(self, filter_obj): - args = filter_obj.get_filter_params() + ['export'] + def filter_tasks(self, filter_obj): + args = ['export', '--'] + filter_obj.get_filter_params() tasks = [] for line in self._execute_command(args): if line: -- 2.39.2