Hello,

I am using koji version 1.16.2 for centos 7 and I'm having issues getting the 
following code to succeed:

################################################

import sys
import logging

import koji
from koji.plugin import callback

koji_hub_path = '/usr/share/koji-hub'
sys.path.insert(0, koji_hub_path)
import kojihub

logger = logging.getLogger('koji.plugins')

@callback('postTag')
def mycallback(cbtype, *args, **kwargs):
# Get the tag name from the buildroot map
    opts = {}
    taskOpts = {}
    tag = kwargs['tag']['name']
    keys = None
    repo_id = 3
    taskOpts['priority'] = koji.PRIO_DEFAULT
    taskOpts['channel'] = 'createrepo'
    taskOpts['owner'] = 3  #This is the kojiadmin account
    taskOpts['arch'] = 'x86_64'
    opts['tag'] = tag
    opts['keys'] = keys
    opts['allow_missing_signatures'] = True
    opts['skip_missing_signatures'] = True
    opts['latest'] = True


    if tag == 'local7':
        logging.getLogger('koji.plugin.mycallback').error('Executing 
mycallback.')
        print 'Variable dump: ', args
        print 'Expected tag is local7. mytag is: ', tag
        print 'Starting dist repo generator for %s...' % tag
        
    return kojihub.make_task('distRepo', [tag, keys], **taskOpts) 
    

The above code always fails with the following exception:

koji.hub: Cannot parse parameters: ['local7', None] of distRepo task


Is make_task the correct function to call in this instance?  What should the 
arguments passed to make_task look like?  

Regards,

Robby
_______________________________________________
buildsys mailing list -- buildsys@lists.fedoraproject.org
To unsubscribe send an email to buildsys-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/buildsys@lists.fedoraproject.org

Reply via email to