Skip to content

Commit

Permalink
recover from invalid commentery urn
Browse files Browse the repository at this point in the history
  • Loading branch information
balmas committed Jun 6, 2016
1 parent 732f389 commit 78cbe7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/author_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@ def make_work(work_id, millnum, pasg):
def process_comm(comm_list):
millnum_list = []
for row in comm_list:
try:
cite_urn = str(row['commentary'][0]['hasBody']['@id'])
millnum = int(cite_urn.split('.')[2])
if millnum:
millnum_list.append(millnum)
else:
pass
millnum_list.sort()
return millnum_list
except:
print("Unable to process" + str(cite_urn))
pass
return millnum_list

0 comments on commit 78cbe7f

Please sign in to comment.