Thanks for you help that did the trick! Here is the working code snippet:
if tag == 'local7-testing':
logging.getLogger('koji.plugin.mycallback').error('Executing
mycallback.')
print 'Expected tag is local7-testing. mytag is: ', tag
print 'Starting dist repo generator for %s...' % tag
repo_id, event_id = kojihub.dist_repo_init(tag, keys, taskOpts)
opts['event'] = event_id
return kojihub.make_task('distRepo', [tag, repo_id, keys, opts], **taskOpts)