Handle KeyError for radio title

This commit is contained in:
Lartza
2020-03-10 16:05:33 +02:00
parent 0ac9603072
commit bb126401e2

View File

@ -80,10 +80,9 @@ def get_radio_title(url):
except (requests.exceptions.ConnectionError, except (requests.exceptions.ConnectionError,
requests.exceptions.HTTPError, requests.exceptions.HTTPError,
requests.exceptions.ReadTimeout, requests.exceptions.ReadTimeout,
requests.exceptions.Timeout) as e: requests.exceptions.Timeout,
error_traceback = traceback.format_exc() KeyError) as e:
error = error_traceback.rstrip().split("\n")[-1] log.debug("radio: unsuccessful attempts on fetching radio title (icy)")
log.debug("radio: unsuccessful attempts on fetching radio title (icy): " + error)
return url return url