Revision: 4124 Author: btongminh Date: 2007-08-28 18:17:19 +0000 (Tue, 28 Aug 2007)
Log Message: ----------- Fix bug 1783491.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-08-28 09:16:59 UTC (rev 4123) +++ trunk/pywikipedia/wikipedia.py 2007-08-28 18:17:19 UTC (rev 4124) @@ -765,13 +765,15 @@ except (NoPage, IsRedirectPage, SectionError): return True
- if self.editRestriction: - self.site().forceLogin(sysop=True) - else: - self.site().forceLogin() + try: + if self.editRestriction: + self.site().forceLogin(sysop=True) + else: + self.site().forceLogin() + username = self.site()._loggedInAs + except NoUsername: + username = None
- username = self.site()._loggedInAs - for template in templates: if template[0] == 'Nobots': return False