Change "None" in qvm_prefs
The string "none" is now changed to '' in qvm_prefs, and only for certain properties (eg netvm).
This commit is contained in:
parent
c0373980af
commit
4156fa38a5
@ -275,8 +275,6 @@ class PropertyHolder(object):
|
||||
value = value.name
|
||||
if value is None:
|
||||
value = ''
|
||||
if str(value).lower() == "none":
|
||||
value = ''
|
||||
try:
|
||||
self.qubesd_call(
|
||||
self._method_dest,
|
||||
|
@ -112,6 +112,9 @@ def process_actions(parser, args, target):
|
||||
args.property = args.property.replace('-', '_')
|
||||
|
||||
if args.value is not None:
|
||||
if str(args.value).lower() == "none":
|
||||
if args.property in ["default_dispvm", "netvm", "template"]:
|
||||
args.value = ''
|
||||
try:
|
||||
setattr(target, args.property, args.value)
|
||||
except AttributeError:
|
||||
|
Loading…
Reference in New Issue
Block a user