diff --git a/ledenlijst.py b/ledenlijst.py index 3e7b392..e5c81ab 100755 --- a/ledenlijst.py +++ b/ledenlijst.py @@ -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)