Fix bug in login

This commit is contained in:
Midgard 2021-08-08 16:20:20 +02:00
parent c16a089c42
commit 96f66437d9
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -155,10 +155,10 @@ def resolve_team_channel(mm_api: mattermost.MMApi, query: str) -> Dict:
def login(mm_api, cmdline_args):
print(
f"Logging in as {cmdline_args.user}; password provided: {yes_no(cmdline_args.password)}; "
f"Logging in as {cmdline_args.login_id}; password provided: {yes_no(cmdline_args.password)}; "
f"TOTP token provided: {yes_no(cmdline_args.totp)}",
file=sys.stderr)
mm_api.login(cmdline_args.user, cmdline_args.password, cmdline_args.totp)
mm_api.login(cmdline_args.login_id, cmdline_args.password, cmdline_args.totp)
if cmdline_args.format == "json":
print(json.dumps({"token": mm_api._bearer}))