Changeset 157
- Timestamp:
- Tue Apr 17 02:11:29 2007
- Files:
-
- trunk/tools.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/tools.py
r153 r157 222 222 # try to get exif info (from jhead) 223 223 try: 224 tag["exifdate"] = re.findall( "Date/Time : (.*)", buf )[0].strip() 225 tag["isflash"] = re.findall( "Flash used : (.*)", buf )[0].strip() 224 exifdate = re.findall( "Date/Time : (.*)", buf )[0].strip() 225 isflash = re.findall( "Flash used : (.*)", buf )[0].strip() 226 226 except IndexError: 227 tag["exifdate"] ="" 228 tag["isflash"] ="" 227 exifdate ="" 228 isflash ="" 229 230 try: 231 cd2d(ed2cd(exifdate)) # just to test if it's a real date 232 except: 233 exifdate = "" 234 235 tag["exifdate"] =exifdate 236 tag["isflash"] =isflash 229 237 230 238 # get the comment (which can be multilines) … … 240 248 tag["exifdate"]=ed2cd(tag["exifdate"]) 241 249 242 if tag["exifdate"]=="00000000000000":243 #exif date is empty ...244 tag["exifdate"]=""245 246 250 return tag 247 251
