From d51f2981026b2b176cf566f522fc985692fb4923 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 7 May 2011 03:00:06 -0400 Subject: Date time bug. --- scanner/PhotoAlbum.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scanner/PhotoAlbum.py') diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index 3ba7dc3..f8b6b14 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -144,7 +144,7 @@ class Photo(object): try: value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S') except: - pass + continue exif[decoded] = value if "Orientation" in exif: @@ -260,9 +260,9 @@ class Photo(object): if not self.is_valid: return datetime(1900, 1, 1) if "DateTimeOriginal" in self._attributes: - return self._attributes["DateTimeOriginal"] + return self._attributes["dateTimeOriginal"] elif "DateTime" in self._attributes: - return self._attributes["DateTime"] + return self._attributes["dateTime"] else: return self._attributes["dateTimeFile"] def __cmp__(self, other): -- cgit v1.2.3-59-g8ed1b