http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10393
Revision: 10393 Author: russblau Date: 2012-06-20 20:33:57 +0000 (Wed, 20 Jun 2012) Log Message: ----------- Make sure to log in as correct user; this facilitates use of the bot with multiple user accounts.
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-06-20 19:45:46 UTC (rev 10392) +++ branches/rewrite/pywikibot/site.py 2012-06-20 20:33:57 UTC (rev 10393) @@ -713,7 +713,7 @@ self._loginstatus = LoginStatus.IN_PROGRESS if not hasattr(self, "_userinfo"): self.getuserinfo() - if self.logged_in(sysop): + if self.userinfo['name'] == self._username[sysop] and self.logged_in(sysop): return loginMan = api.LoginManager(site=self, sysop=sysop, user=self._username[sysop])