Added some little error-handling.
This commit is contained in:
parent
8ecaeb90cf
commit
ddce160994
1 changed files with 3 additions and 1 deletions
4
kit.py
4
kit.py
|
|
@ -141,7 +141,9 @@ def test_reservation():
|
||||||
}, cookies=cookies
|
}, cookies=cookies
|
||||||
)
|
)
|
||||||
|
|
||||||
print(r.status_code, r.text)
|
if not r.ok:
|
||||||
|
print("Slot is not available anymore!")
|
||||||
|
return False
|
||||||
|
|
||||||
oid = r.json()['data']['id']
|
oid = r.json()['data']['id']
|
||||||
oat = r.json()['data']['attributes']['access_token']
|
oat = r.json()['data']['attributes']['access_token']
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue