Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>epel9
parent
05e377d823
commit
42c9f507be
@ -0,0 +1,51 @@
|
||||
From 7675881c5481d7157c64c6a2a008fac7fbf5c495 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Kopecek <tkopecek@redhat.com>
|
||||
Date: Jan 15 2021 11:56:31 +0000
|
||||
Subject: [PATCH 1/2] kojid: backward compatible hub call
|
||||
|
||||
|
||||
Fixes: https://pagure.io/koji/issue/2648
|
||||
|
||||
---
|
||||
|
||||
diff --git a/builder/kojid b/builder/kojid
|
||||
index 7f4557a..ca33a00 100755
|
||||
--- a/builder/kojid
|
||||
+++ b/builder/kojid
|
||||
@@ -1328,7 +1328,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:
|
||||
|
||||
From a53aa56b87a569ccb8eb3173f7eddfe86b2dfea2 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Kopecek <tkopecek@redhat.com>
|
||||
Date: Jan 15 2021 15:23:44 +0000
|
||||
Subject: [PATCH 2/2] typo
|
||||
|
||||
|
||||
---
|
||||
|
||||
diff --git a/builder/kojid b/builder/kojid
|
||||
index ca33a00..b503405 100755
|
||||
--- a/builder/kojid
|
||||
+++ b/builder/kojid
|
||||
@@ -1330,7 +1330,7 @@ class BuildArchTask(BaseBuildTask):
|
||||
"""
|
||||
try:
|
||||
avg = self.session.getAverageBuildDuration(name, age=6)
|
||||
- except ParameterError:
|
||||
+ except koji.ParameterError:
|
||||
# for hub < 1.23
|
||||
avg = self.session.getAverageBuildDuration(name)
|
||||
|
||||
|
Loading…
Reference in new issue