This change prevents the code from checking image bytes on unicode filenames. (I'm assuming that no-one will be passing in a unicode string for image data.)
It was easier to keep the same if, elif, else ... flow, so I added a maybe_image condition before each string comparison.
Just fixes some annoying warnings in my pytest output for Python 2.7.
Coverage increased (+0.02%) to 95.048% when pulling 9d379679ca1761c7c5b585e3c0a97e0716354d64 on ndbroadbent:fix-python2-unicode-warnings into 42eeed469d47cd5679b74129dd616834f05072eb on hMatoba:master.
Coverage increased (+0.02%) to 95.048% when pulling 9d379679ca1761c7c5b585e3c0a97e0716354d64 on ndbroadbent:fix-python2-unicode-warnings into 42eeed469d47cd5679b74129dd616834f05072eb on hMatoba:master.
Fixes #64
This change prevents the code from checking image bytes on unicode filenames. (I'm assuming that no-one will be passing in a unicode string for image data.)
It was easier to keep the same
if
,elif
,else
... flow, so I added amaybe_image
condition before each string comparison.Just fixes some annoying warnings in my pytest output for Python 2.7.