From: Ian Weller Date: Tue, 22 Dec 2009 09:25:12 +0000 (-0600) Subject: _login() now actually logs in to remote wiki X-Git-Url: https://projects.mako.cc/source/mw/commitdiff_plain/fc69b26dbca870828cb1e5fe4e580532a39540b7 _login() now actually logs in to remote wiki --- diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index 60d98df..9360822 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -48,6 +48,11 @@ class CommandBase(object): def _login(self): user = raw_input('Username: ') passwd = getpass.getpass() + result = self.api.call({'action': 'login', + 'lgname': user, + 'lgpassword': passwd}) + if result['login']['result'] != 'Success': + raise Exception('Login error: %s' % result['login']['result']) def _die_if_no_init(self): if self.metadir.config is None: