Skip to content

Commit cab3578

Browse files
committed
Fix fallback code to not use _PI_REV_CODES
1 parent f05c528 commit cab3578

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ def _pi_id(self) -> Optional[str]:
240240

241241
if re_model:
242242
pi_model = "".join(re_model.groups())
243-
available_models = boards._PI_REV_CODES.keys()
243+
available_models = boards._PI_MODELS.values()
244244
for model in available_models:
245+
# Account for the PI_B_REV1/2 case
246+
if isinstance(model, dict) and pi_model in model:
247+
return model[pi_model]
245248
if model == pi_model:
246249
return model
247250

0 commit comments

Comments
 (0)