From 10e21dd8ea0f678e42ffe45882d2c8ccc3d60d93 Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 18:13:06 +0100 Subject: [PATCH] modules/CommandDrinkBindAccount.py --- modules/CommandDrinkBindAccount.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/CommandDrinkBindAccount.py b/modules/CommandDrinkBindAccount.py index e29cd46..c82e6c8 100644 --- a/modules/CommandDrinkBindAccount.py +++ b/modules/CommandDrinkBindAccount.py @@ -31,13 +31,13 @@ class CommandDrinkBindAccount(AbstractCommand): try: handle = MCAPI.API("KEYBOARD", mc_credentials[0], mc_credentials[1]) handle.manage_token('add', 'MM_'+data["user_id"]) - except MCAPI.APIException as e: - if e.message == 'CERR_AUTH_FAIL_ACCPWDRATE': + except MCAPI.APIException as exc: + if exc.message == 'CERR_AUTH_FAIL_ACCPWDRATE': request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Invalid drink-terminal credentials.") - elif e.message == 'CERR_FAILED_TO_ADD_TOKEN_EXISTING': + elif exc.message == 'CERR_FAILED_TO_ADD_TOKEN_EXISTING': request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Mattermost username is already bound to an account.") else: - request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Unknown error: "+repr(e)) + request.respond_cmd_err("Failed to bind Mattermost account to drink-terminal account: Unknown error: "+repr(exc)) return self.bot.debug_chan("``/drink-bind-account success: @"+data["user_name"]+'``') -- 2.43.0