From de86a3c1a4c8d8e66d871a659e697456ae64db74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 3 Apr 2016 03:45:05 +0200 Subject: [PATCH] tools/qvm_prefs: reject invalid properties instead of ignoring silently --- qubes/tools/qvm_prefs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/tools/qvm_prefs.py b/qubes/tools/qvm_prefs.py index 336b319a..df7295e7 100644 --- a/qubes/tools/qvm_prefs.py +++ b/qubes/tools/qvm_prefs.py @@ -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)