diff --git a/tools/psoc6/get-devs.py b/tools/psoc6/get-devs.py index f556845eac8a..8ea99b6434a1 100644 --- a/tools/psoc6/get-devs.py +++ b/tools/psoc6/get-devs.py @@ -65,7 +65,7 @@ def get_kitprog_serial_number(udevadm_output_lines): for line in udevadm_output_lines: attr = re.search('ATTRS{serial}=="[a-zA-Z0-9]*"', str(line)) if attr is not None: - sn = attr.group().removeprefix("ATTRS{serial}==") + sn = attr.group()[len("ATTRS{serial}==") :] sn = sn.strip('"') return sn