1
0
mirror of https://github.com/pyro2927/SouthwestCheckin.git synced 2025-12-15 15:53:42 +00:00

enable verbose output (#55)

* 	modified:   checkin.py
	modified:   southwest/southwest.py

* 	modified:   .codeclimate.yml

* 	modified:   checkin.py
	modified:   southwest/southwest.py

* 	modified:   southwest.py
This commit is contained in:
bllfr0g
2019-10-27 19:29:14 -07:00
committed by Joseph Pintozzi
parent defb2bdbbc
commit f9572fae19
3 changed files with 20 additions and 7 deletions

View File

@@ -50,8 +50,8 @@ def schedule_checkin(flight_time, reservation):
print("{} got {}{}!".format(doc['name'], doc['boardingGroup'], doc['boardingPosition']))
def auto_checkin(reservation_number, first_name, last_name, notify=[]):
r = Reservation(reservation_number, first_name, last_name, notify)
def auto_checkin(reservation_number, first_name, last_name, notify=[], verbose=False):
r = Reservation(reservation_number, first_name, last_name, notify, verbose)
body = r.lookup_existing_reservation()
# Get our local current time
@@ -89,12 +89,13 @@ def auto_checkin(reservation_number, first_name, last_name, notify=[]):
if __name__ == '__main__':
arguments = docopt(__doc__, version='Southwest Checkin 1')
arguments = docopt(__doc__, version='Southwest Checkin 2')
reservation_number = arguments['CONFIRMATION_NUMBER']
first_name = arguments['FIRST_NAME']
last_name = arguments['LAST_NAME']
email = arguments['--email']
mobile = arguments['--mobile']
verbose = arguments['--verbose']
# build out notifications
notifications = []
@@ -104,7 +105,7 @@ if __name__ == '__main__':
notifications.append({'mediaType': 'SMS', 'phoneNumber': mobile})
try:
auto_checkin(reservation_number, first_name, last_name, notifications)
auto_checkin(reservation_number, first_name, last_name, notifications, verbose)
except KeyboardInterrupt:
print("Ctrl+C detected, canceling checkin")
sys.exit()