Skip to content

Commit

Permalink
Fix an error with date and cloudonly
Browse files Browse the repository at this point in the history
When calling cli with both --cloud-only and --date, if there
are no matching schedules, the current set of hosts is incorrectly
returned.

Fixes: #466
Change-Id: Ifb7f9da1e899c03829b6e38e1a712b1293898db2
  • Loading branch information
kambiz-aghaiepour committed Feb 8, 2024
1 parent 513557f commit 5939c1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion quads/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,10 @@ def action_cloudonly(self):
if schedule.host in _hosts:
self.logger.info(schedule.host.name)
else:
if _kwargs.get("date") and self.cli_args["cloud"] == "cloud01":
if _kwargs.get("date"):
if self.cli_args["cloud"] != "cloud01":
return

data = {
"start": _kwargs["date"],
"end": _kwargs["date"],
Expand Down

0 comments on commit 5939c1a

Please sign in to comment.