cli: handle hub w/o getKojiVersion in cancel tasks
Cancel tasks are used from newer fedora koji client on some hubs that are lacking any getKojiVersion method, so assumes older_hub = True Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
This commit is contained in:
parent
32901980ba
commit
93a5ca5abe
1 changed files with 6 additions and 3 deletions
|
|
@ -6213,9 +6213,12 @@ def handle_cancel(goptions, session, args):
|
|||
parser.error("You must specify at least one task id or build")
|
||||
activate_session(session, goptions)
|
||||
older_hub = False
|
||||
hub_version = session.getKojiVersion()
|
||||
v = tuple([int(x) for x in hub_version.split('.')])
|
||||
if v < (1, 33, 0):
|
||||
try:
|
||||
hub_version = session.getKojiVersion()
|
||||
v = tuple([int(x) for x in hub_version.split('.')])
|
||||
if v < (1, 33, 0):
|
||||
older_hub = True
|
||||
except koji.GenericError:
|
||||
older_hub = True
|
||||
tlist = []
|
||||
blist = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue