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.
This commit is contained in:
Peter Hutterer 2018-02-08 12:10:37 +10:00
parent ac3906f9cc
commit b8de0aa020
1 changed files with 2 additions and 1 deletions

View File

@ -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):