Revision: 4824 Author: rotem Date: 2008-01-07 06:41:05 +0000 (Mon, 07 Jan 2008)
Log Message: ----------- (bug 1865598) Don't show a UserBlocked exception if the IP is only blocked - get the bots page after logging in.
Modified Paths: -------------- trunk/pywikipedia/login.py
Modified: trunk/pywikipedia/login.py =================================================================== --- trunk/pywikipedia/login.py 2008-01-06 18:50:34 UTC (rev 4823) +++ trunk/pywikipedia/login.py 2008-01-07 06:41:05 UTC (rev 4824) @@ -216,13 +216,13 @@ self.password = self.password.encode(self.site.encoding())
wikipedia.output(u"Logging in to %s as %s" % (self.site, self.username)) - # Ensure bot policy on the English Wikipedia - if not self.botAllowed(): - wikipedia.output(u'*** Your username is not listed on [[%s]].\n*** Please make sure you are allowed to use the robot before actually using it!' % botList[self.site.family.name][self.site.lang]) cookiedata = self.getCookie() if cookiedata: self.storecookiedata(cookiedata) wikipedia.output(u"Should be logged in now") + # Show a warning according to the local bot policy + if not self.botAllowed(): + wikipedia.output(u'*** Your username is not listed on [[%s]].\n*** Please make sure you are allowed to use the robot before actually using it!' % botList[self.site.family.name][self.site.lang]) return True else: wikipedia.output(u"Login failed. Wrong password or CAPTCHA answer?")