From 981b914cb6962f39cc1ca961020780744d04e318 Mon Sep 17 00:00:00 2001 From: Carsten Thue-Bludworth Date: Wed, 15 Feb 2023 22:30:20 +0000 Subject: [PATCH] Changed if-else statement order to work for Pinephone --- adafruit_platformdetect/board.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 460f9e1..097886c 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -452,14 +452,14 @@ def _pine64_id(self) -> Optional[str]: """Try to detect the id for Pine64 board or device.""" board_value = self.detector.get_device_model() board = None - if "pine64" in board_value.lower(): + if "pinephone" in board_value.lower(): + board = boards.PINEPHONE + elif "pine64" in board_value.lower(): board = boards.PINE64 elif "pine h64" in board_value.lower(): board = boards.PINEH64 elif "pinebook" in board_value.lower(): board = boards.PINEBOOK - elif "pinephone" in board_value.lower(): - board = boards.PINEPHONE elif "sopine" in board_value.lower(): board = boards.SOPINE return board