get first by search

pull/28386/head
Shane Smiskol 2 years ago
parent b43d21c650
commit 30d3fda8d2
  1. 6
      selfdrive/car/hyundai/values.py

@ -347,9 +347,9 @@ FINGERPRINTS = {
def get_platform_codes(fw_versions: List[bytes]) -> Set[bytes]: def get_platform_codes(fw_versions: List[bytes]) -> Set[bytes]:
codes = set() codes = set()
for fw in fw_versions: for fw in fw_versions:
matches = re.findall(PLATFORM_CODE_PATTERN, fw) match = re.search(PLATFORM_CODE_PATTERN, fw)
if len(matches): if match is not None:
codes.add(matches[0]) codes.add(match.group())
return codes return codes

Loading…
Cancel
Save