Add explanation in assertion

This commit is contained in:
Midgard 2020-12-09 18:12:56 +01:00
parent 73ecc49d49
commit d4ad33ec7a
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -72,8 +72,8 @@ mm = mattermost.MMApi(f"https://{SERVER}/api")
if TOKEN:
mm.login(bearer=TOKEN)
else:
assert USER
assert PASSWORD
assert USER, "USER and PASSWORD or TOKEN envvars must be set"
assert PASSWORD, "USER and PASSWORD or TOKEN envvars must be set"
mm.login(USER, PASSWORD)
# pylint: disable=protected-access # bad library design: can't fix this without extra API request