Fix AttributeError when subid is already numeric. Fixes #37
This commit is contained in:
parent
a7ad1934dd
commit
78bf933290
@ -14,7 +14,7 @@
|
||||
def get_name(hwid, subid, default=None):
|
||||
global DEVICES
|
||||
hwid = int(hwid)
|
||||
if subid.isnumeric():
|
||||
if type(subid) is str and subid.isnumeric():
|
||||
subid = int(subid)
|
||||
return DEVICES.get(hwid, {subid: default}).get(subid, default)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user