From 836503156d7681c564277d229556315fb182f75f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 29 Mar 2012 15:42:53 +0200 Subject: Sometimes exif strings are null terminated, and python imagining library doesn't deal with that for us. --- scanner/PhotoAlbum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scanner/PhotoAlbum.py') diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index 78bdb63..ea4e6c2 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -146,7 +146,7 @@ class Photo(object): for tag, value in info.items(): decoded = TAGS.get(tag, tag) if isinstance(value, str): - value = value.strip() + value = value.strip().partition("\x00")[0] if isinstance(decoded, str) and decoded.startswith("DateTime"): try: value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S') -- cgit v1.2.3-59-g8ed1b