Commit 67975f4b authored by Jacek Sowiński's avatar Jacek Sowiński

Print empty output of `dep ls`

Lack of printing empty result was especially confusing in column UI
(console wasn't opened and user could think that command wasn't
executed).
parent 77abb6c0
......@@ -119,13 +119,12 @@ class DepCommand(Command):
todo = self.todolist.todo(number)
todos = self.todolist.parents(todo)
else:
self.error(self.usage())
raise InvalidCommandArgument
if todos:
sorter = Sorter(config().sort_string())
instance_filter = Filter.InstanceFilter(todos)
view = View(sorter, [instance_filter], self.todolist)
self.out(self.printer.print_list(view.todos))
sorter = Sorter(config().sort_string())
instance_filter = Filter.InstanceFilter(todos)
view = View(sorter, [instance_filter], self.todolist)
self.out(self.printer.print_list(view.todos))
except InvalidTodoException:
self.error("Invalid todo number given.")
except InvalidCommandArgument:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment