Skip to content

Commit 0fa89fd

Browse files
committed
Fix pylint errors for unspecified try/except blocks
1 parent 990b4ee commit 0fa89fd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Metro/Metro_RP2350_Chips_Challenge/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
dac.headphone_output = True
4646
dac.headphone_volume = -15 # dB
4747

48-
try:
48+
if hasattr(board, "I2S_BCLK"):
4949
audio_bus = audiobusio.I2SOut(board.I2S_BCLK, board.I2S_WS, board.I2S_DIN)
50-
except:
50+
else:
5151
audio_bus = audiobusio.I2SOut(board.D9, board.D10, board.D11)
5252
audio = Audio(audio_bus, SOUND_EFFECTS)
5353

Metro/Metro_RP2350_Chips_Challenge/savestate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ def _mount_sd_card(self):
2727

2828
# Check if the SD card is already mounted
2929
try:
30-
storage.remount('/sd',readonly=False)
30+
storage.getmount("/sd")
3131
return True
32-
except:
32+
except OSError:
3333
pass
3434

3535
self._card_detect = DigitalInOut(board.SD_CARD_DETECT)

0 commit comments

Comments
 (0)