check image type sanity in buildImage

This commit is contained in:
Mike McLean 2012-10-05 11:26:13 -04:00
parent 4075949cb3
commit 08f4cdb853

View file

@ -6918,6 +6918,9 @@ class RootExports(object):
Create an image using a kickstart file and group package list.
"""
if img_type not in ('livecd', 'appliance'):
raise koji.GenericError, 'Unrecognized image type: %s' % img_type
context.session.assertPerm(img_type)
taskOpts = {'channel': img_type}