From ebf740e4b03b37cd28fe65898b0f9ab7fd38c43c Mon Sep 17 00:00:00 2001 From: Michael F Date: Wed, 13 Sep 2023 09:01:55 +0200 Subject: [PATCH] fix: exception on processing zero tps --- Makefile | 2 +- src/tagpack/cli.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ac845c4..0f17c90 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SHELL := /bin/bash PROJECT := tagpack-tool VENV := .venv RELEASE := 'v23.06' -RELEASESEM := 'v1.7.0' +RELEASESEM := 'v1.7.1' all: format lint test build diff --git a/src/tagpack/cli.py b/src/tagpack/cli.py index dfaca59..2304e0f 100644 --- a/src/tagpack/cli.py +++ b/src/tagpack/cli.py @@ -494,7 +494,10 @@ def insert_tagpack(args): # process data in the main process, makes debugging easier results = [worker(p) for p in packs] - no_passed, no_tags = [sum(x) for x in zip(*results)] + if results is not None and len(results) > 0: + no_passed, no_tags = [sum(x) for x in zip(*results)] + else: + no_passed, no_tags = (0, 0) status = "fail" if no_passed < n_ppacks else "success"