From fc69b26dbca870828cb1e5fe4e580532a39540b7 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Tue, 22 Dec 2009 03:25:12 -0600 Subject: [PATCH] _login() now actually logs in to remote wiki --- src/mw/clicommands.py | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.39.5