From cc440c62f626fab4dea765dd9753159e3221bc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 2 Nov 2016 06:21:42 +0100 Subject: [PATCH] qubes/tools: accept properties with '-' '-' is invalid character in python identifier, so all the properties have '_'. But in previous versions qvm-* tools accepted names with '-', so lets not break this. QubesOS/qubes-issues#2412 --- qubes/tools/qubes_prefs.py | 2 ++ qubes/tools/qvm_prefs.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/qubes/tools/qubes_prefs.py b/qubes/tools/qubes_prefs.py index acf09490..9f6a947b 100644 --- a/qubes/tools/qubes_prefs.py +++ b/qubes/tools/qubes_prefs.py @@ -87,6 +87,8 @@ def main(args=None): name=prop.__name__, width=width, value=value)) return 0 + else: + args.property = args.property.replace('-', '_') if args.value is not None: diff --git a/qubes/tools/qvm_prefs.py b/qubes/tools/qvm_prefs.py index 3fc503fd..5a3d545c 100644 --- a/qubes/tools/qvm_prefs.py +++ b/qubes/tools/qvm_prefs.py @@ -91,6 +91,8 @@ def main(args=None): name=prop.__name__, width=width, value=value)) return 0 + else: + args.property = args.property.replace('-', '_') if args.property not in [prop.__name__ for prop in args.domain.property_list()]: