add limit to number of commets script can make in one pass
This commit is contained in:
parent
726f0b11dc
commit
98566a2d06
@ -21,7 +21,8 @@ DEFAULT_CONFIG_PATH = './config.ini'
|
||||
DEFAULT_WORKING_DIRECTORY = './tmp'
|
||||
DEFAULT_APP_URL = 'https://app.flightschedulepro.com'
|
||||
DEFAULT_TIMEOUT = 10 # seconds
|
||||
DEFAULT_DAY_LOOKAHEAD = 2
|
||||
DEFAULT_DAY_LOOKAHEAD = 2
|
||||
DEFAULT_MAX_COMMENTS = 5
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
@ -154,6 +155,8 @@ def filter_row_by_date(reservation_row: webelement.WebElement) -> bool:
|
||||
rows = get_reservation_rows()
|
||||
|
||||
row_count = len(rows)
|
||||
if row_count > DEFAULT_MAX_COMMENTS:
|
||||
die('Found more than ' + str(DEFAULT_MAX_COMMENTS) + ' reservations. Aborting...')
|
||||
print('found ' + str(row_count) + ' reservations to add reservation comment to')
|
||||
for i in range(0, row_count):
|
||||
row = rows[i]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user