dom0/qvm-tools: check property name in qubes-prefs
This commit is contained in:
parent
507e9652d6
commit
1d49bf9dc5
@ -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()):
|
||||
|
Loading…
Reference in New Issue
Block a user