qvm-create: fix --template option
This commit is contained in:
parent
d3425142bc
commit
9da5ae8169
@ -96,8 +96,8 @@ def main():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
parser.error('no such domain class: {!r}'.format(args.cls))
|
parser.error('no such domain class: {!r}'.format(args.cls))
|
||||||
|
|
||||||
if 'template' in args.properties \
|
if 'template' in args.properties and \
|
||||||
and 'template' not in cls.list_properties():
|
'template' not in (prop.__name__ for prop in cls.property_list()):
|
||||||
parser.error('this domain class does not support template')
|
parser.error('this domain class does not support template')
|
||||||
|
|
||||||
vm = app.add_new_vm(cls, **args.properties)
|
vm = app.add_new_vm(cls, **args.properties)
|
||||||
|
Loading…
Reference in New Issue
Block a user