From 1d49bf9dc5209d0f7242f3d419af715931cfbee0 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 19 Dec 2012 04:37:09 +0100 Subject: [PATCH] dom0/qvm-tools: check property name in qubes-prefs --- dom0/qvm-tools/qubes-prefs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom0/qvm-tools/qubes-prefs b/dom0/qvm-tools/qubes-prefs index f135d428..bc8ce214 100755 --- a/dom0/qvm-tools/qubes-prefs +++ b/dom0/qvm-tools/qubes-prefs @@ -119,7 +119,7 @@ def main(): qvm_collection.unlock_db() if options.do_set: - if len (args) < 2: + if len (args) < 2 or args[0] not in preferences.keys(): print >> sys.stderr, "You must specify the property and the new value you wish to set..." print >> sys.stderr, "Available properties:" for p in sorted(preferences.keys()): @@ -133,7 +133,7 @@ def main(): qvm_collection.unlock_db() elif options.do_get: - if len (args) < 1: + if len (args) < 1 or args[0] not in preferences.keys(): print >> sys.stderr, "You must specify the property you wish to get..." print >> sys.stderr, "Available properties:" for p in sorted(preferences.keys()):