Handle TypeError exception when no ImageMagick install is present

Fixes an error introduced in 1a6e0a7 where a TypeError exception was
raised when calling `_check_method()` with no ImageMagick installation
present.
This commit is contained in:
ababyduck 2019-04-24 09:35:56 -07:00
parent 666790bd83
commit e00640e7dd

View file

@ -227,9 +227,12 @@ class ArtResizer(six.with_metaclass(Shareable, object)):
@staticmethod
def _check_method():
"""Return a tuple indicating an available method and its version."""
version, isLegacy = get_im_version()
if version:
return IMAGEMAGICK, version, isLegacy
try:
version, isLegacy = get_im_version()
if version:
return IMAGEMAGICK, version, isLegacy
except TypeError:
pass
version = get_pil_version()
if version: