1

Adding handling for incorrect field markup

Former-commit-id: 1f496162e8fc779cb4950d4f3c179e4d6d52aa61
This commit is contained in:
Alex Yatskov 2013-11-16 12:51:21 -08:00
parent b6d80360d7
commit 9461c0f3dc

View File

@ -83,7 +83,10 @@ def findSentence(content, position):
def formatFields(fields, markup):
result = dict()
for field, value in fields.items():
result[field] = value.format(**markup)
try:
result[field] = value.format(**markup)
except KeyError:
pass
return result