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
|
value = value.name
|
||||||
if value is None:
|
if value is None:
|
||||||
value = ''
|
value = ''
|
||||||
if str(value).lower() == "none":
|
|
||||||
value = ''
|
|
||||||
try:
|
try:
|
||||||
self.qubesd_call(
|
self.qubesd_call(
|
||||||
self._method_dest,
|
self._method_dest,
|
||||||
|
@ -112,6 +112,9 @@ def process_actions(parser, args, target):
|
|||||||
args.property = args.property.replace('-', '_')
|
args.property = args.property.replace('-', '_')
|
||||||
|
|
||||||
if args.value is not None:
|
if args.value is not None:
|
||||||
|
if str(args.value).lower() == "none":
|
||||||
|
if args.property in ["default_dispvm", "netvm", "template"]:
|
||||||
|
args.value = ''
|
||||||
try:
|
try:
|
||||||
setattr(target, args.property, args.value)
|
setattr(target, args.property, args.value)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user