Fix options.force in import_comps
Change from opts.force to opts['force'] was introduced in
434bfb86f4, but this one is not working
now.
This commit is contained in:
parent
ad633967c8
commit
43fb086f97
2 changed files with 4 additions and 4 deletions
4
cli/koji
4
cli/koji
|
|
@ -1800,7 +1800,7 @@ def _import_comps(session, filename, tag, options):
|
|||
"""Import comps data using libcomps module"""
|
||||
comps = libcomps.Comps()
|
||||
comps.fromxml_f(filename)
|
||||
force = options['force']
|
||||
force = options.force
|
||||
ptypes = {
|
||||
libcomps.PACKAGE_TYPE_DEFAULT : 'default',
|
||||
libcomps.PACKAGE_TYPE_OPTIONAL : 'optional',
|
||||
|
|
@ -1834,7 +1834,7 @@ def _import_comps_alt(session, filename, tag, options):
|
|||
print 'WARN: yum.comps does not support the biarchonly of group and basearchonly of package'
|
||||
comps = yumcomps.Comps()
|
||||
comps.add(filename)
|
||||
force = options['force']
|
||||
force = options.force
|
||||
for group in comps.groups:
|
||||
print "Group: %(groupid)s (%(name)s)" % vars(group)
|
||||
session.groupListAdd(tag, group.groupid, force=force, display_name=group.name,
|
||||
|
|
|
|||
|
|
@ -286,8 +286,8 @@ class TestImportComps(unittest.TestCase):
|
|||
calls_file,
|
||||
stdout):
|
||||
tag = 'tag'
|
||||
force = None
|
||||
options = {'force': force}
|
||||
options = mock.MagicMock()
|
||||
options.force = None
|
||||
|
||||
# Mock out the xmlrpc server
|
||||
session = mock.MagicMock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue