Fix formatting (Black).

This commit is contained in:
Dain Nilsson 2021-11-09 09:16:49 +01:00
parent e42eb2206c
commit 4f4c48b9d5
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,9 @@ def get_descriptor(path):
try:
buf = array("B", [0] * 64)
length = fcntl.ioctl(f, HIDIOCGRAWUNIQ, buf, True)
serial = bytearray(buf[: (length - 1)]).decode("utf-8") if length > 1 else None
serial = (
bytearray(buf[: (length - 1)]).decode("utf-8") if length > 1 else None
)
except OSError:
serial = None