Revision: 7737 Author: filnik Date: 2009-12-06 14:05:17 +0000 (Sun, 06 Dec 2009)
Log Message: ----------- Bugfix: whitelist not used with this script. Please stop adding bugs to my script, thanks. Or, at least, fix them before committing..
Modified Paths: -------------- trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py =================================================================== --- trunk/pywikipedia/welcome.py 2009-12-05 21:27:58 UTC (rev 7736) +++ trunk/pywikipedia/welcome.py 2009-12-06 14:05:17 UTC (rev 7737) @@ -560,22 +560,21 @@ del list_white, whitelist_default
try: - for bname in self._blacklist: - if bname.lower() in str(name.lower()): #bad name positive - self.bname = bname - return True - except UnicodeEncodeError: - pass - try: for wname in self._whitelist: - if wname.lower() in str(name.lower()): - name = name.replace(wname.lower(), '') + if wname.lower() in str(name).lower(): + name = name.lower().replace(wname.lower(), '') for bname in self._blacklist: self.bname = bname return bname.lower() in name.lower() except UnicodeEncodeError: - pass - + pass + try: + for bname in self._blacklist: + if bname.lower() in str(name).lower(): #bad name positive + self.bname = bname + return True + except UnicodeEncodeError: + pass return False
def reportBadAccount(self, name = None, final = False): @@ -824,7 +823,6 @@ us = self._parseNewUserLogOld() else: us = self.parseNewUserLog() - for users in us: if users.isBlocked(): showStatus(3)
pywikipedia-svn@lists.wikimedia.org