From 204e939afb402fd1be4c19b393fd2e49220f9485 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mon, 28 Jun 2010 12:49:39 -0400 Subject: [PATCH] workaround api variation in list-tagged/latest-pkg when a mead cli talks to a non-mead hub --- cli/koji | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/koji b/cli/koji index 2ca9b465..a29e3e4a 100755 --- a/cli/koji +++ b/cli/koji @@ -2077,7 +2077,10 @@ def anon_handle_latest_pkg(options, session, args): else: fmt = "%(name)s-%(version)s-%(release)s.%(arch)s" else: - data = session.getLatestBuilds(args[0], package=pkg, type=options.type) + kwargs = {'package': pkg} + if options.type: + kwargs['type'] = options.type + data = session.getLatestBuilds(args[0], **kwargs) if options.paths: if options.type == 'maven': for x in data: @@ -2213,7 +2216,8 @@ def anon_handle_list_tagged(options, session, args): if options.sigs: opts['rpmsigs'] = True options.rpms = True - opts['type'] = options.type + if options.type: + opts['type'] = options.type event = koji.util.eventFromOpts(session, options) if event: opts['event'] = event['id']