File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,6 @@ def _pi_rev_code(self) -> Optional[str]:
218
218
# pylint: disable=no-self-use
219
219
def _beaglebone_id (self ) -> Optional [str ]:
220
220
"""Try to detect id of a Beaglebone."""
221
-
222
221
board_value = self .detector .get_device_compatible ()
223
222
# Older Builds
224
223
if "freedom-u74-arty" in board_value :
@@ -232,7 +231,11 @@ def _beaglebone_id(self) -> Optional[str]:
232
231
with open ("/sys/bus/nvmem/devices/0-00500/nvmem" , "rb" ) as eeprom :
233
232
eeprom_bytes = eeprom .read (16 )
234
233
except FileNotFoundError :
235
- return None
234
+ try :
235
+ with open ("/sys/bus/nvmem/devices/0-00501/nvmem" , "rb" ) as eeprom :
236
+ eeprom_bytes = eeprom .read (16 )
237
+ except FileNotFoundError :
238
+ return None
236
239
237
240
if eeprom_bytes [:4 ] != b"\xaa U3\xee " :
238
241
return None
@@ -249,7 +252,6 @@ def _beaglebone_id(self) -> Optional[str]:
249
252
return model
250
253
251
254
board_value = self .detector .get_armbian_release_field ("BOARD" )
252
-
253
255
return None
254
256
255
257
# pylint: enable=no-self-use
You can’t perform that action at this time.
0 commit comments