diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-05-07 03:12:20 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-05-07 03:12:20 -0400 |
commit | e87fe0a96cdf8b51ae79c6446c58d203b2a6e61f (patch) | |
tree | 03c6713b3db85e0d413f8517cda9c976446dd89f /scanner | |
parent | More case bugs. (diff) | |
download | PhotoFloat-e87fe0a96cdf8b51ae79c6446c58d203b2a6e61f.tar.xz PhotoFloat-e87fe0a96cdf8b51ae79c6446c58d203b2a6e61f.zip |
Fix dem bugs.
Diffstat (limited to 'scanner')
-rw-r--r-- | scanner/PhotoAlbum.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index e88fef4..367c56c 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -140,7 +140,7 @@ class Photo(object): decoded = TAGS.get(tag, tag) if isinstance(value, str): value = value.strip() - if decoded.startswith("DateTime"): + if isinstance(decoded, str) and decoded.startswith("DateTime"): try: value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S') except: @@ -279,7 +279,7 @@ class Photo(object): path = os.path.join(basepath, dictionary["name"]) del dictionary["name"] for key, value in dictionary.items(): - if key.startswith("DateTime"): + if key.startswith("dateTime"): try: dictionary[key] = datetime.strptime(dictionary[key], "%a %b %d %H:%M:%S %Y") except: |