hMatoba / Piexif

Exif manipulation with pure python script.
MIT License
369 stars 82 forks source link

Fix "UnicodeWarning: Unicode equal comparison failed" warnings for unicode filenames on Python 2 #68

Closed ndbroadbent closed 5 years ago

ndbroadbent commented 6 years ago

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 a maybe_image condition before each string comparison.

Just fixes some annoying warnings in my pytest output for Python 2.7.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 95.048% when pulling 9d379679ca1761c7c5b585e3c0a97e0716354d64 on ndbroadbent:fix-python2-unicode-warnings into 42eeed469d47cd5679b74129dd616834f05072eb on hMatoba:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 95.048% when pulling 9d379679ca1761c7c5b585e3c0a97e0716354d64 on ndbroadbent:fix-python2-unicode-warnings into 42eeed469d47cd5679b74129dd616834f05072eb on hMatoba:master.

hMatoba commented 5 years ago

Thank you so much.