tools/qvm_prefs: reject invalid properties instead of ignoring silently

This commit is contained in:
Marek Marczykowski-Górecki 2016-04-03 03:45:05 +02:00 committed by Wojtek Porczyk
parent c07981da88
commit de86a3c1a4

View File

@ -83,6 +83,8 @@ def main(args=None):
return 0
if args.property not in [prop.__name__ for prop in args.vm.property_list()]:
parser.error('no such property: {!r}'.format(args.property))
if args.value is not None:
setattr(args.vm, args.property, args.value)