Skip to content

Commit

Permalink
Fix return code
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Jan 5, 2024
1 parent d832042 commit 9d9e55f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zb.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
nproc = options.threads if options.threads else len(os.sched_getaffinity(0))
threshold_map = {k: float(v) for k, v in helpers.parse_csv_as_dict(options.thresholds).items()}
results = thread_map(curry_zerobg(threshold_map), mapper, max_workers=nproc, total=mapper.count(), maxinterval=0.1)
if not all(results):
sys.exit(1)

# raise exceptions, if any
for _ in results:
pass


def curry_zerobg(threshold_map: dict[str, float]) -> Callable[[tuple[Path, Path]], bool]:
Expand Down

0 comments on commit 9d9e55f

Please sign in to comment.