Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
Fix mismatch of empty headers at end of data
Browse files Browse the repository at this point in the history
  • Loading branch information
bartromgens committed Mar 21, 2016
1 parent 5a36229 commit 161f543
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ledenlijst.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,10 @@ def read_xls(f):
logger.critical("Last row in first column is not an integer. Please contact the ICT-team.")
sys.exit(1)
# Confirm first row matches with expectations
if sheet.row_values(0) != EXPECTED_HEADERS:
logger.critical("First row does not match expectations, possible format-change. Please contact the ICT-team if you are not completely sure what to do.")
sys.exit(1)
for header_expected, header in zip(EXPECTED_HEADERS, sheet.row_values(0)):
if header_expected != header:
logger.critical("First row does not match expectations, possible format-change. Please contact the ICT-team if you are not completely sure what to do.")
sys.exit(1)
if sheet.nrows not in range(4000,7000):
logger.critical("Total number of rows very different from hardcoded safeguard. Please contact the ICT-team.")
sys.exit(1)
Expand Down

0 comments on commit 161f543

Please sign in to comment.