From 577e4b24a6b039af32285b323d57197eb7a8440f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Wed, 18 Mar 2020 14:17:04 +0100 Subject: [PATCH] gui: fixes from Marek's comments --- qubes/ext/gui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubes/ext/gui.py b/qubes/ext/gui.py index 35ff5902..dc61e888 100644 --- a/qubes/ext/gui.py +++ b/qubes/ext/gui.py @@ -125,7 +125,7 @@ class GUI(qubes.ext.Extension): @qubes.ext.handler('domain-feature-pre-set:keyboard-layout') def on_feature_pre_set(self, subject, event, feature, value, oldvalue=None): untrusted_xkb_layout = value.split('+') - if not len(untrusted_xkb_layout) == 3: + if len(untrusted_xkb_layout) != 3: raise qubes.exc.QubesValueError("Invalid number of parameters") untrusted_layout = untrusted_xkb_layout[0] @@ -137,7 +137,7 @@ class GUI(qubes.ext.Extension): if not untrusted_layout.isalpha(): raise qubes.exc.QubesValueError("Invalid layout provided") - if not bool(re.match(re_variant, untrusted_variant)): + if not re.match(re_variant, untrusted_variant): raise qubes.exc.QubesValueError("Invalid variant provided") - if not bool(re.match(re_options, untrusted_options)): + if not re.match(re_options, untrusted_options): raise qubes.exc.QubesValueError("Invalid options provided")