[Python-modules-commits] [python-exif] 04/19: Minor fixes to make it work on py 3.x
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Oct 6 22:18:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to reference refs/remotes/upstream/develop
in repository python-exif.
commit 3685f0516f85aa2ddf2ee2723a207784d18bf47a
Author: velis74 <jure.erznoznik at gmail.com>
Date: Mon Oct 28 04:16:23 2013 +0100
Minor fixes to make it work on py 3.x
---
exifread/classes.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/exifread/classes.py b/exifread/classes.py
index 246eb92..55384d8 100644
--- a/exifread/classes.py
+++ b/exifread/classes.py
@@ -180,7 +180,9 @@ class ExifHeader:
values = self.file.read(count)
#print values
# Drop any garbage after a null.
- values = values.split('\x00', 1)[0]
+ values = values.split(b'\x00', 1)[0]
+ if isinstance(values, bytes):
+ values = values.decode("utf-8")
except OverflowError:
values = ''
else:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-exif.git
More information about the Python-modules-commits
mailing list