From b8de0aa020afd43c690daf86e4d97086d63865ec Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 8 Feb 2018 12:10:37 +1000 Subject: [PATCH] wacom: always fall back to the is_spark() approach for unknown protocols We don't write out 'unknown' as protocol, so if we cannot find it in the config or the config returns unknown (default value if unset), fall back to the old method. --- tuhi/wacom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 7aa8268..f0c5669 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -683,7 +683,8 @@ class WacomDevice(GObject.Object): except StopIteration: logger.error(f'Unknown protocol in configuration: {self._config["Protocol"]}') raise WacomCorruptDataException(f'Unknown Protocol {protocol}') - else: + + if protocol == Protocol.UNKNOWN: # we are registering a new device, or we might have an early # config file from an older tuhi version if WacomProtocol.is_spark(self._device):