Skip to content

Commit

Permalink
ImageMagick check uses convert, not identify
Browse files Browse the repository at this point in the history
See #670 for details. This reverts a change from
a0c38a0. This caused problems on
Windows, but the fundamental problem is more general.
  • Loading branch information
sampsyo committed Jun 10, 2016
1 parent 9204604 commit e346c28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions beets/util/artresizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ def _check_method():

def get_im_version():
"""Return Image Magick version or None if it is unavailable
Try invoking ImageMagick's "convert"."""
Try invoking ImageMagick's "convert".
"""
try:
out = util.command_output([b'identify', b'--version'])
out = util.command_output([b'convert', b'--version'])

if b'imagemagick' in out.lower():
pattern = br".+ (\d+)\.(\d+)\.(\d+).*"
Expand All @@ -244,7 +245,8 @@ def get_im_version():
int(match.group(3)))
return (0,)

except (subprocess.CalledProcessError, OSError):
except (subprocess.CalledProcessError, OSError) as exc:
log.debug(u'ImageMagick check `convert --version` failed: {}', exc)
return None


Expand Down
2 changes: 1 addition & 1 deletion test/test_embedart.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def require_artresizer_compare(test):

def wrapper(*args, **kwargs):
if not ArtResizer.shared.can_compare:
raise unittest.SkipTest()
raise unittest.SkipTest("compare not available")
else:
return test(*args, **kwargs)

Expand Down

0 comments on commit e346c28

Please sign in to comment.