mirror of
https://github.com/pyro2927/SouthwestCheckin.git
synced 2025-12-16 00:03:16 +00:00
Fixing bug in checkin, adding status print
This commit is contained in:
@@ -31,6 +31,8 @@ if date > tomorrow:
|
|||||||
print "Too early to check in, waiting {} seconds".format(delta)
|
print "Too early to check in, waiting {} seconds".format(delta)
|
||||||
time.sleep(delta)
|
time.sleep(delta)
|
||||||
|
|
||||||
|
print "Attempting check-in..."
|
||||||
|
|
||||||
# Get our passengers to get boarding passes for
|
# Get our passengers to get boarding passes for
|
||||||
passengers = []
|
passengers = []
|
||||||
for passenger in body['passengers']:
|
for passenger in body['passengers']:
|
||||||
@@ -43,7 +45,7 @@ r = requests.post(url, headers=headers, json={'names': passengers})
|
|||||||
|
|
||||||
body = r.json()
|
body = r.json()
|
||||||
|
|
||||||
if body['httpStatusCode'] == 'FORBIDDEN':
|
if 'httpStatusCode' in body and body['httpStatusCode'] == 'FORBIDDEN':
|
||||||
print body['message']
|
print body['message']
|
||||||
else:
|
else:
|
||||||
# Spit out info about boarding number
|
# Spit out info about boarding number
|
||||||
|
|||||||
Reference in New Issue
Block a user