From: Rob Golding Date: Wed, 15 May 2013 20:19:44 +0000 (+0100) Subject: Fix mismatched parentheses bug X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/0b4824fc72c2de0c1c4738c31d0d30935393a6ec?ds=sidebyside Fix mismatched parentheses bug --- 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: