From a91577fe1de47f750eed4b50d4f54c2753f5c902 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jan 26 2021 13:05:38 +0000 Subject: kojid: backward compatible hub call Fixes: https://pagure.io/koji/issue/2648 --- diff --git a/builder/kojid b/builder/kojid index f91e832..18f39ad 100755 --- a/builder/kojid +++ b/builder/kojid @@ -1327,7 +1327,12 @@ class BuildArchTask(BaseBuildTask): weight is scaled from a minimum of 1.5 to a maximum of 6, based on the average duration of a build of this package. """ - avg = self.session.getAverageBuildDuration(name, age=6) + try: + avg = self.session.getAverageBuildDuration(name, age=6) + except ParameterError: + # for hub < 1.23 + avg = self.session.getAverageBuildDuration(name) + if not avg: return if avg < 0: