http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11517
Revision: 11517 Author: russblau Date: 2013-05-09 17:50:39 +0000 (Thu, 09 May 2013) Log Message: ----------- Fix bug #3546402: Switching sites with different accounts does not re-login
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2013-05-09 17:46:39 UTC (rev 11516) +++ branches/rewrite/pywikibot/site.py 2013-05-09 17:50:39 UTC (rev 11517) @@ -798,8 +798,9 @@ """Log the user in if not already logged in.""" # check whether a login cookie already exists for this user self._loginstatus = LoginStatus.IN_PROGRESS - if not hasattr(self, "_userinfo"): - self.getuserinfo() + if hasattr(self, "_userinfo"): + del self._userinfo + self.getuserinfo() if self.userinfo['name'] == self._username[sysop] and self.logged_in(sysop): return loginMan = api.LoginManager(site=self, sysop=sysop,
pywikipedia-svn@lists.wikimedia.org