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:
Peter Hutterer 2019-08-22 09:08:47 +10:00
parent 9fcd2b9517
commit fe75fc4342
1 changed files with 6 additions and 3 deletions

View File

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