We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44f412d commit 71b66b5Copy full SHA for 71b66b5
adafruit_platformdetect/board.py
@@ -276,7 +276,7 @@ def _beaglebone_id(self) -> Optional[str]:
276
#Special Case for AI64
277
with open("/sys/bus/nvmem/devices/2-00500/nvmem", "rb") as eeprom:
278
eeprom_bytes = eeprom.read(16)
279
- except:
+ except FileNotFoundError:
280
return None
281
282
if eeprom_bytes[:4] != b"\xaaU3\xee":
@@ -294,8 +294,6 @@ def _beaglebone_id(self) -> Optional[str]:
294
eeprom_bytes = eeprom.read(24)
295
if eeprom_bytes == b"\xaaU3\xee\x017\x00\x10.\x00BEAGLEPLAY-A0-":
296
return boards.BEAGLE_PLAY
297
- else:
298
- return None
299
300
id_string = eeprom_bytes[4:].decode("ascii")
301
for model, bb_ids in boards._BEAGLEBONE_BOARD_IDS.items():
0 commit comments