forked from expo/troggle
extra error printout and remove old code
This commit is contained in:
parent
d27a74c97b
commit
ff3cdb10dc
parsers
@ -137,6 +137,10 @@ def ParseDate(tripdate, year):
|
|||||||
day, month, year = int(mdategoof.group(1)), int(mdategoof.group(2)), int(mdategoof.group(4)) + yadd
|
day, month, year = int(mdategoof.group(1)), int(mdategoof.group(2)), int(mdategoof.group(4)) + yadd
|
||||||
else:
|
else:
|
||||||
assert False, tripdate
|
assert False, tripdate
|
||||||
|
message" ! - Bad date in logbook: " + tripdate + " - " + year
|
||||||
|
DataIssue.objects.create(parser='logbooks', message=message)
|
||||||
|
logdataissues[tid+"author"]=message
|
||||||
|
|
||||||
return datetime.date(year, month, day)
|
return datetime.date(year, month, day)
|
||||||
|
|
||||||
# 2006, 2008 - 2009
|
# 2006, 2008 - 2009
|
||||||
|
@ -5,28 +5,6 @@ from utils import save_carefully
|
|||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from unidecode import unidecode
|
from unidecode import unidecode
|
||||||
|
|
||||||
# def saveMugShot(mugShotPath, mugShotFilename, person):
|
|
||||||
# if mugShotFilename.startswith(r'i/'): #if filename in cell has the directory attached (I think they all do), remove it
|
|
||||||
# mugShotFilename=mugShotFilename[2:]
|
|
||||||
# else:
|
|
||||||
# mugShotFilename=mugShotFilename # just in case one doesn't
|
|
||||||
|
|
||||||
# dummyObj=models.DPhoto(file=mugShotFilename)
|
|
||||||
|
|
||||||
# #Put a copy of the file in the right place. mugShotObj.file.path is determined by the django filesystemstorage specified in models.py
|
|
||||||
# if not os.path.exists(dummyObj.file.path):
|
|
||||||
# shutil.copy(mugShotPath, dummyObj.file.path)
|
|
||||||
|
|
||||||
# mugShotObj, created = save_carefully(
|
|
||||||
# models.DPhoto,
|
|
||||||
# lookupAttribs={'is_mugshot':True, 'file':mugShotFilename},
|
|
||||||
# nonLookupAttribs={'caption':"Mugshot for "+person.first_name+" "+person.last_name}
|
|
||||||
# )
|
|
||||||
|
|
||||||
# if created:
|
|
||||||
# mugShotObj.contains_person.add(person)
|
|
||||||
# mugShotObj.save()
|
|
||||||
|
|
||||||
def parseMugShotAndBlurb(personline, header, person):
|
def parseMugShotAndBlurb(personline, header, person):
|
||||||
"""create mugshot Photo instance"""
|
"""create mugshot Photo instance"""
|
||||||
mugShotFilename=personline[header["Mugshot"]]
|
mugShotFilename=personline[header["Mugshot"]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user