diff --git a/qubesadmin/base.py b/qubesadmin/base.py index 68bf804..f1f59d7 100644 --- a/qubesadmin/base.py +++ b/qubesadmin/base.py @@ -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, diff --git a/qubesadmin/tools/qvm_prefs.py b/qubesadmin/tools/qvm_prefs.py index f237384..3d8c3e0 100644 --- a/qubesadmin/tools/qvm_prefs.py +++ b/qubesadmin/tools/qvm_prefs.py @@ -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: