Skip to content

Commit 0c18246

Browse files
committed
icon download failure will not break the TUI
1 parent e88ec00 commit 0c18246

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyradio/radio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,12 @@ def _thread_download_station_image(self, url, stop):
22382238
if logger.isEnabledFor(logging.DEBUG):
22392239
logger.debug('+++ icon download: asked to stop. Stopping...')
22402240
return
2241-
response = requests.get(url)
2241+
try:
2242+
response = requests.get(url)
2243+
except:
2244+
if logger.isEnabledFor(logging.DEBUG):
2245+
logger.debug('+++ icon download fialed!!')
2246+
return
22422247
if stop():
22432248
if logger.isEnabledFor(logging.DEBUG):
22442249
logger.debug('+++ icon download: asked to stop. Stopping...')

0 commit comments

Comments
 (0)