Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Add mitama serial check
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajunsu committed Sep 1, 2018
1 parent 6b253db commit 90b7d49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion calculator_of_Onmyoji/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def get_mitama_data_xls(filename, ignore_serial):
prop_name = data_format.MITAMA_COL_NAME_ZH[i]
data[prop_name] = float(r_data[i].value) if r_data[i].value else 0

mitama_data[serial] = data
if serial in mitama_data:
print('Mitama serial must be unique %s' % serial)
raise ValueError
mitama_data.setdefault(serial, data)

return mitama_data

Expand Down

0 comments on commit 90b7d49

Please sign in to comment.