Documented the get_original_date method

This commit is contained in:
Tryggvi Björgvinsson 2012-11-25 16:38:44 +00:00
parent d682d066d3
commit 2d8ce464de

View File

@ -41,6 +41,11 @@ class ImageData(Base):
gps_direction = Column(Float) gps_direction = Column(Float)
def get_original_date(self): def get_original_date(self):
"""
Get the original date and time from the EXIF information. Returns
either a datetime object or None (if anything goes wrong)
"""
import datetime import datetime
try: try:
# Try wrapped around all since exif_all might be none, # Try wrapped around all since exif_all might be none,