Skip to content

Commit

Permalink
A bit of hack: file-only download command
Browse files Browse the repository at this point in the history
  • Loading branch information
George V. Kouryachy (Fr. Br. George) committed Oct 11, 2023
1 parent 2d69a9f commit 7b0b079
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions hworker/control/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7b0b079

Please sign in to comment.