Skip to content

Commit 2fba760

Browse files
committed
flux-mini: fix bulksubmit error on zero jobs
Problem: when zero jobs are given to bulksubmit, it fails with a ZeroDivisionError when printing the progress bar, or (if no progress bar) it fails because self.flux_handle was not initialized. Solution: check for zero jobs and throw a reasonable error.
1 parent af1e0bc commit 2fba760

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cmd/flux-mini.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,8 @@ def main(self, args):
13741374
for xargs in commands:
13751375
total += len(self.cc_list(xargs))
13761376

1377+
if total == 0:
1378+
raise ValueError("no jobs provided for bulk submission")
13771379
# Initialize progress bar if requested:
13781380
if args.progress:
13791381
if not args.dry_run:

0 commit comments

Comments
 (0)