From 78bf9332901dd5200081113437516d580c590297 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 27 May 2024 01:42:07 +0100 Subject: [PATCH] Fix AttributeError when subid is already numeric. Fixes #37 --- grmn/devices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grmn/devices.py b/grmn/devices.py index 1d82866..6265a79 100644 --- a/grmn/devices.py +++ b/grmn/devices.py @@ -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)