Skip to content

Commit 4818264

Browse files
committed
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.
1 parent f6ecbf6 commit 4818264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beetsplug/fetchart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def _fetch_image(self, url):
436436
self._log.debug(u'downloaded art to: {0}',
437437
util.displayable_path(fh.name))
438438
return fh.name
439-
except (IOError, requests.RequestException):
439+
except (IOError, requests.RequestException, TypeError):
440440
self._log.debug(u'error fetching art')
441441

442442
def _is_valid_image_candidate(self, candidate):

0 commit comments

Comments
 (0)