Revision: 6633 Author: filnik Date: 2009-04-19 10:01:29 +0000 (Sun, 19 Apr 2009)
Log Message: ----------- Bugfix, double non-existing license wasn't detected correctly. Now it does. Thanks cosoleto :)
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2009-04-19 09:25:42 UTC (rev 6632) +++ trunk/pywikipedia/checkimages.py 2009-04-19 10:01:29 UTC (rev 6633) @@ -1136,17 +1136,18 @@ if self.licenses_found != []: self.templateInList() if self.license_found == None and self.allLicenses != list(): - iterLicenses = self.allLicenses - for template in iterLicenses: + # If only iterlist = self.AllLicenses if I remove something + # from iterlist it will be remove from self.AllLicenses too + iterlist = list(self.allLicenses) + for template in iterlist: try: template.pageAPInfo() except wikipedia.IsRedirectPage: template = template.getRedirectTarget() except wikipedia.NoPage: - self.allLicenses.remove(template) + self.allLicenses.remove(template) if self.allLicenses != list(): self.license_found = self.allLicenses[0].title() - self.some_problem = False # If it has "some_problem" it must check # the additional settings. # if self.settingsData, use addictional settings
pywikipedia-svn@lists.wikimedia.org