From 7b0b079333de808caf5c946bbd8b19e8d812bb14 Mon Sep 17 00:00:00 2001 From: "George V. Kouryachy (Fr. Br. George)" Date: Wed, 11 Oct 2023 19:04:26 +0300 Subject: [PATCH] A bit of hack: file-only download command --- hworker/control/cli.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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):