http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9771
Revision: 9771 Author: filnik Date: 2011-11-16 17:37:38 +0000 (Wed, 16 Nov 2011) Log Message: ----------- please TRY THE CODE before committing. THANKS. Bugfix for the license problem
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2011-11-16 17:36:30 UTC (rev 9770) +++ trunk/pywikipedia/checkimages.py 2011-11-16 17:37:38 UTC (rev 9771) @@ -1217,7 +1217,8 @@ if self.site.lang == 'commons': no_licenses_to_skip = catlib.categoryAllPageObjectsAPI('Category:License-related tags') for license_given in no_licenses_to_skip: - list_licenses.remove(license_given) + if license_given in list_licenses: + list_licenses.remove(license_given) pywikibot.output('') # blank line
# Add the licenses set in the default page as licenses
pywikipedia-svn@lists.wikimedia.org