* Adding some safey into the mock-client tester so that it doesn't just explode in pipelines

This commit is contained in:
shockrah 2021-05-03 13:24:24 -07:00
parent 7c8bc8b4fc
commit f094ab49de

View File

@ -16,8 +16,11 @@ def login() -> (Request, str):
200
)
response = req.fire()
jwt = response.json().get('jwt')
return (req, jwt)
try:
jwt = response.json().get('jwt')
return (req, jwt)
except:
return (req, None)
def make_channel(url: str, id: int, jwt: str) -> (Request, int):
# making a text channel
@ -89,6 +92,7 @@ if __name__ == '__main__':
login_req, jwt = login()
if jwt is None:
print('Unable to /login - stopping now to avoid pointless failure')
req.show_response()
exit(1)
admin.jwt = jwt