wacom: be more specific in the spark's original error code
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
9fcd2b9517
commit
fe75fc4342
|
@ -429,9 +429,12 @@ class WacomRegisterHelper(WacomProtocolLowLevelComm):
|
||||||
# expected
|
# expected
|
||||||
try:
|
try:
|
||||||
self.p.execute(Interactions.CONNECT, uuid)
|
self.p.execute(Interactions.CONNECT, uuid)
|
||||||
except tuhi.protocol.DeviceError:
|
except tuhi.protocol.DeviceError as e:
|
||||||
# this is expected
|
if e.errorcode == tuhi.protocol.DeviceError.ErrorCode.GENERAL_ERROR:
|
||||||
pass
|
# this is expected
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise e
|
||||||
|
|
||||||
# The "press button now command" on the spark
|
# The "press button now command" on the spark
|
||||||
self.p.execute(Interactions.REGISTER_PRESS_BUTTON)
|
self.p.execute(Interactions.REGISTER_PRESS_BUTTON)
|
||||||
|
|
Loading…
Reference in New Issue