Fix dem bugs.

This commit is contained in:
Jason A. Donenfeld 2011-05-07 03:12:20 -04:00
parent 47a1e12c2c
commit e87fe0a96c
2 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -105,7 +105,7 @@ a:hover {
}
#metadata {
background-color: #000000;
width: 220px;
width: 240px;
font-size: 12px;
line-height: 12px;
padding-top: 3px;