From 4818264a362de8e23d64bb2f92934b1ee7062d7a Mon Sep 17 00:00:00 2001 From: Ben Ockmore Date: Sat, 1 Aug 2015 16:50:59 +0100 Subject: [PATCH] Added TypeError to the list of caught exceptions in fetachart._fetch_image requests/urllib3 is throwing an exception due to an internal problem triggered by some sort of timeout. This change catches the TypeError so that beets reports "error fetching art" instead of crashing when this happens. --- beetsplug/fetchart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index bc772bd83..d4d8e07bd 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -436,7 +436,7 @@ class FetchArtPlugin(plugins.BeetsPlugin): self._log.debug(u'downloaded art to: {0}', util.displayable_path(fh.name)) return fh.name - except (IOError, requests.RequestException): + except (IOError, requests.RequestException, TypeError): self._log.debug(u'error fetching art') def _is_valid_image_candidate(self, candidate):