diff --git a/hworker/control/cli.py b/hworker/control/cli.py index 54c4bb5..a9e9fd3 100644 --- a/hworker/control/cli.py +++ b/hworker/control/cli.py @@ -200,10 +200,18 @@ def complete_shell(self, text, line, begidx, endidx): return self.filtertext(globals(), prefix) def do_download(self, arg): - """Download all homeworks (do not parse if "only" parmeter is given)""" + """Download all homeworks + + Download from single backend if backand name is given + Do not parse if "only" parmeter is given + """ args = self.shplit(arg) - deliver.download_all() - if args != ["only"]: + back = set(args) - {"only"} + if back: + getattr(deliver, back.pop()).download_all() + else: + deliver.download_all() + if "only" not in args: make.parse_all_stored_homeworks() def complete_download(self, text, line, begidx, endidx):