From ecadcef64289ea03c8efd00b9b433a4e98c0e360 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Nov 2013 11:59:04 +0100 Subject: [PATCH] Prevent a division by zero in hydra-queue-runner Fixes #131. --- src/script/hydra-queue-runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/hydra-queue-runner b/src/script/hydra-queue-runner index f67d8cc2..2744c243 100755 --- a/src/script/hydra-queue-runner +++ b/src/script/hydra-queue-runner @@ -106,7 +106,7 @@ sub checkBuilds { { join => ['project'], select => ['system'], as => ['system'], distinct => 1 }); # Get the total number of scheduling shares. - my $totalShares = getTotalShares($db); + my $totalShares = getTotalShares($db) || 1; # For each system type, select up to the maximum number of # concurrent build for that system type.