Skip to content

Commit 71b66b5

Browse files
committed
Fixed pre-commit Errors
1 parent 44f412d commit 71b66b5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_platformdetect/board.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _beaglebone_id(self) -> Optional[str]:
276276
#Special Case for AI64
277277
with open("/sys/bus/nvmem/devices/2-00500/nvmem", "rb") as eeprom:
278278
eeprom_bytes = eeprom.read(16)
279-
except:
279+
except FileNotFoundError:
280280
return None
281281

282282
if eeprom_bytes[:4] != b"\xaaU3\xee":
@@ -294,8 +294,6 @@ def _beaglebone_id(self) -> Optional[str]:
294294
eeprom_bytes = eeprom.read(24)
295295
if eeprom_bytes == b"\xaaU3\xee\x017\x00\x10.\x00BEAGLEPLAY-A0-":
296296
return boards.BEAGLE_PLAY
297-
else:
298-
return None
299297

300298
id_string = eeprom_bytes[4:].decode("ascii")
301299
for model, bb_ids in boards._BEAGLEBONE_BOARD_IDS.items():

0 commit comments

Comments
 (0)