Revision: 3978 Author: wikipedian Date: 2007-08-06 20:39:15 +0000 (Mon, 06 Aug 2007)
Log Message: ----------- fixed bug [ 1767285 ] NoUsername raised but not caught
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-08-06 17:50:31 UTC (rev 3977) +++ trunk/pywikipedia/wikipedia.py 2007-08-06 20:39:15 UTC (rev 3978) @@ -1784,8 +1784,12 @@ host = self.site().hostname() address = self.site().delete_address(self.urlname())
- self.site().forceLogin(sysop = True) - + try: + self.site().forceLogin(sysop = True) + except NoUsername, error: + # user hasn't entered an admin username. + output(str(error)) + return token = self.site().getToken(self, sysop = True) predata = { 'wpReason': reason,