X-Git-Url: https://projects.mako.cc/source/mw/blobdiff_plain/6ef083635c4bf8eb46d29de59501da90fe34b994..68c68ed8ee4dc61fd44791ec974daa983c604ead:/src/mw/clicommands.py diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index 0fa122a..7acfba2 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -305,6 +305,11 @@ class CommitCommand(CommandBase): if self.options.bot: data['bot'] = 'bot' response = self.api.call(data) + if 'error' in response: + if 'code' in response['error']: + if response['error']['code'] == 'permissiondenied': + print 'Permission denied -- try running "mw login"' + return if response['edit']['result'] == 'Success': if 'nochange' in response['edit']: print 'warning: no changes detected in %s - ' \