From fe75fc4342130c7649cd4e4ef7c748f364e651bd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Aug 2019 09:08:47 +1000 Subject: [PATCH] wacom: be more specific in the spark's original error code Signed-off-by: Peter Hutterer --- tuhi/wacom.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tuhi/wacom.py b/tuhi/wacom.py index 01d71f9..86e0013 100644 --- a/tuhi/wacom.py +++ b/tuhi/wacom.py @@ -429,9 +429,12 @@ class WacomRegisterHelper(WacomProtocolLowLevelComm): # expected try: self.p.execute(Interactions.CONNECT, uuid) - except tuhi.protocol.DeviceError: - # this is expected - pass + except tuhi.protocol.DeviceError as e: + if e.errorcode == tuhi.protocol.DeviceError.ErrorCode.GENERAL_ERROR: + # this is expected + pass + else: + raise e # The "press button now command" on the spark self.p.execute(Interactions.REGISTER_PRESS_BUTTON)