sorl/sorl-thumbnail — pull request #82 by codepass (2012-01-19 18:31:22+00:00)
Title: Thumbnail tag fails with ValueError for some images.

I've got the following trace:

ERROR Thumbnail tag failed:
[...skipped...]
File "/usr/local/lib/python2.7/dist-packages/sorl_thumbnail-11.12-py2.7.egg/sorl/thumbnail/engines/convert_engine.py", line 95, in _orientation
result = int(result)
ValueError: invalid literal for int() with base 10: 'unknown'

I guess sometimes 'unknown' may appear in the result variable (line 95 of convert_engine.py) instead of integer value of rotation angle.

This change to seems to fix the problem