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

Fixing bug in checkin, adding status print

This commit is contained in:
pyro2927
2016-12-22 14:52:28 -07:00
parent 197ac3d925
commit dad00883ce

View File

@@ -31,6 +31,8 @@ if date > tomorrow:
print "Too early to check in, waiting {} seconds".format(delta)
time.sleep(delta)
print "Attempting check-in..."
# Get our passengers to get boarding passes for
passengers = []
for passenger in body['passengers']:
@@ -43,7 +45,7 @@ r = requests.post(url, headers=headers, json={'names': passengers})
body = r.json()
if body['httpStatusCode'] == 'FORBIDDEN':
if 'httpStatusCode' in body and body['httpStatusCode'] == 'FORBIDDEN':
print body['message']
else:
# Spit out info about boarding number