From acb65a1bc88644baf6f00ef5967127c49db4de4b Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Thu, 9 Aug 2018 00:39:00 +0200 Subject: [PATCH] check-svg: only warn about non-consecutive buttons Some devices like the logitech G9 have a button in its profile data which is not a real physical button. This breaks the direct mapping from button number to profile number. This patch reduces this case from an error to a warning --- data/gnome/check-svg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/gnome/check-svg.py b/data/gnome/check-svg.py index 2da3812e..602f35cd 100755 --- a/data/gnome/check-svg.py +++ b/data/gnome/check-svg.py @@ -49,7 +49,7 @@ def check_layers(root): def check_elements(root, prefix, required=0): """ Checks for elements of the form 'prefixN' in the root tag. Any elements - found must be consecutive or an error is printed, i.e. if there's a + found must be consecutive or an warning is printed, i.e. if there's a 'button8' there has to be a 'button7'. If required is nonzero, an error is logged for any missing element with @@ -70,7 +70,7 @@ def check_elements(root, prefix, required=0): highest = idx previous = '{}{}'.format(prefix, idx - 1) if idx > 0 and previous not in element_ids: - logger.error("Non-consecutive {}: {}".format(prefix, e)) + logger.warning("Non-consecutive {}: {}".format(prefix, e)) leader = '{}{}-leader'.format(prefix, idx) if leader not in element_ids: