Skip to content

Commit

Permalink
Merge the "waiting" list back into the "pending" list.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jan 20, 2014
1 parent ddf4df9 commit 3d9f050
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion taskw/warrior.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,18 @@ def sync(self):
def load_tasks(self, command='all'):
""" Returns a dictionary of tasks for a list of command."""

return dict(
results = dict(
(db, self._get_json('status:%s' % db, 'export'))
for db in Command.files(command)
)

# 'waiting' tasks are returned separately from 'pending' tasks
# Here we merge the waiting list back into the pending list.
if 'pending' in results:
results['pending'] = self._get_json('status:waiting', 'export')

return results

def get_task(self, **kw):
task = dict()
task_id = None
Expand Down

0 comments on commit 3d9f050

Please sign in to comment.