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]:
218218 # pylint: disable=no-self-use
219219 def _beaglebone_id (self ) -> Optional [str ]:
220220 """Try to detect id of a Beaglebone."""
221-
222221 board_value = self .detector .get_device_compatible ()
223222 # Older Builds
224223 if "freedom-u74-arty" in board_value :
@@ -232,7 +231,11 @@ def _beaglebone_id(self) -> Optional[str]:
232231 with open ("/sys/bus/nvmem/devices/0-00500/nvmem" , "rb" ) as eeprom :
233232 eeprom_bytes = eeprom .read (16 )
234233 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
236239
237240 if eeprom_bytes [:4 ] != b"\xaa U3\xee " :
238241 return None
@@ -249,7 +252,6 @@ def _beaglebone_id(self) -> Optional[str]:
249252 return model
250253
251254 board_value = self .detector .get_armbian_release_field ("BOARD" )
252-
253255 return None
254256
255257 # pylint: enable=no-self-use
You can’t perform that action at this time.
0 commit comments