From dba9d472a8dac5383a0b2dcb8b9ba0c70a848a13 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Tue, 6 Oct 2020 18:09:25 -0400 Subject: [PATCH] hidapi: fix bug in processing of serial numbers --- lib/hidapi/udev.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/hidapi/udev.py b/lib/hidapi/udev.py index 6d50f800..05c18b7f 100644 --- a/lib/hidapi/udev.py +++ b/lib/hidapi/udev.py @@ -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):