Fix bug in login
This commit is contained in:
parent
c16a089c42
commit
96f66437d9
1 changed files with 2 additions and 2 deletions
4
mmcli.py
4
mmcli.py
|
@ -155,10 +155,10 @@ def resolve_team_channel(mm_api: mattermost.MMApi, query: str) -> Dict:
|
||||||
|
|
||||||
def login(mm_api, cmdline_args):
|
def login(mm_api, cmdline_args):
|
||||||
print(
|
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)}",
|
f"TOTP token provided: {yes_no(cmdline_args.totp)}",
|
||||||
file=sys.stderr)
|
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":
|
if cmdline_args.format == "json":
|
||||||
print(json.dumps({"token": mm_api._bearer}))
|
print(json.dumps({"token": mm_api._bearer}))
|
||||||
|
|
Loading…
Reference in a new issue