hidapi: fix bug in processing of serial numbers
This commit is contained in:
parent
7a7aad8977
commit
dba9d472a8
|
@ -404,8 +404,7 @@ def get_serial(device_handle):
|
|||
:param device_handle: a device handle returned by open() or open_path().
|
||||
"""
|
||||
serial = get_indexed_string(device_handle, 2)
|
||||
if serial is not None:
|
||||
return ''.join(hex(ord(c)) for c in serial)
|
||||
return serial
|
||||
|
||||
|
||||
def get_indexed_string(device_handle, index):
|
||||
|
|
Loading…
Reference in New Issue