wacom: allow for "no specific requested opcode" where we just return the data

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-08-02 10:28:51 +10:00
parent 16c22a95ec
commit fd02453279
1 changed files with 5 additions and 5 deletions

View File

@ -503,9 +503,9 @@ class WacomProtocolLowLevelComm(GObject.Object):
# logger.debug(f'received {data.opcode:02x} / {data.length:02x} / {b2hex(bytes(data))}')
if expected_opcode is not None:
if not isinstance(expected_opcode, list):
expected_opcode = [expected_opcode]
if data.opcode not in expected_opcode:
raise WacomException(f'unexpected opcode: {data.opcode:02x}')