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:
jimtahu 2018-06-07 17:52:37 -05:00
parent c0373980af
commit 4156fa38a5
No known key found for this signature in database
GPG Key ID: 2732DBEC0BE2336C
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -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: