mirror of
https://github.com/beetbox/beets.git
synced 2026-02-26 17:21:24 +01:00
Make get_im_version() return same types across all conditions
`get_im_version` should now always return a tuple containing: - index 0: a tuple representing the version - index 1: a bool or None, representing legacy status
This commit is contained in:
parent
48be3a7eaf
commit
09abd9802a
1 changed files with 4 additions and 4 deletions
|
|
@ -232,9 +232,9 @@ class ArtResizer(six.with_metaclass(Shareable, object)):
|
|||
def _check_method():
|
||||
"""Return a tuple indicating an available method and its version."""
|
||||
try:
|
||||
version, im_legacy = get_im_version()
|
||||
if version:
|
||||
return IMAGEMAGICK, version, im_legacy
|
||||
version, legacy = get_im_version()
|
||||
if version > (0, 0, 0):
|
||||
return IMAGEMAGICK, version, legacy
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ def get_im_version():
|
|||
except (subprocess.CalledProcessError, OSError) as exc:
|
||||
log.debug(u'ImageMagick version check failed: {}', exc)
|
||||
|
||||
return (0, None)
|
||||
return ((0,), None)
|
||||
|
||||
|
||||
def get_pil_version():
|
||||
|
|
|
|||
Loading…
Reference in a new issue