Merge pull request #146 from agprimatic/patch-1
Catch illegal timestamp value
This commit is contained in:
@@ -805,7 +805,11 @@ class PhotosDB:
|
||||
else:
|
||||
self._dbphotos[uuid]["lastmodifieddate"] = None
|
||||
|
||||
self._dbphotos[uuid]["imageDate"] = datetime.fromtimestamp(row[5] + td)
|
||||
try:
|
||||
self._dbphotos[uuid]["imageDate"] = datetime.fromtimestamp(row[5] + td)
|
||||
except ValueError:
|
||||
self._dbphotos[uuid]["imageDate"] = datetime.date(1970,1,1)
|
||||
|
||||
self._dbphotos[uuid]["mainRating"] = row[6]
|
||||
self._dbphotos[uuid]["hasAdjustments"] = row[7]
|
||||
self._dbphotos[uuid]["hasKeywords"] = row[8]
|
||||
|
||||
Reference in New Issue
Block a user