]> projects.mako.cc - mw/commitdiff
_login() now actually logs in to remote wiki
authorIan Weller <ian@ianweller.org>
Tue, 22 Dec 2009 09:25:12 +0000 (03:25 -0600)
committerIan Weller <ian@ianweller.org>
Tue, 22 Dec 2009 09:25:12 +0000 (03:25 -0600)
src/mw/clicommands.py

index 60d98df9978e7fa33f5127d8c3e476a594484732..936082205bd3ee102ad714a12fe7d84e86ae0e46 100644 (file)
@@ -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:

Benjamin Mako Hill || Want to submit a patch?