From 6d9bccebe57117a56e85936259ca6ff3166f3c27 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 30 Jan 2020 08:23:57 +0000 Subject: [PATCH] scripts/pkgbuilder.py: need at least one process --- scripts/pkgbuilder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/pkgbuilder.py b/scripts/pkgbuilder.py index 58ced081b7..f4b2602576 100755 --- a/scripts/pkgbuilder.py +++ b/scripts/pkgbuilder.py @@ -318,7 +318,8 @@ class Builder: self.threadcount = int(maxthreadcount) self.threadcount = 1 if self.threadcount < 1 else self.threadcount - self.threadcount = self.jobtotal if self.jobtotal <= self.threadcount else self.threadcount + self.threadcount = min(self.jobtotal, self.threadcount) + self.threadcount = max(1, self.threadcount) if args.debug: DEBUG("THREADCOUNT#: input arg: %s, computed: %d" % (maxthreadcount, self.threadcount))