[Pywikipedia-l] SVN: [6029] trunk/pywikipedia/checkimages.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Sun Oct 26 17:31:12 UTC 2008
Revision: 6029
Author: filnik
Date: 2008-10-26 17:31:12 +0000 (Sun, 26 Oct 2008)
Log Message:
-----------
Other little bugfixes
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2008-10-26 16:35:06 UTC (rev 6028)
+++ trunk/pywikipedia/checkimages.py 2008-10-26 17:31:12 UTC (rev 6029)
@@ -375,7 +375,6 @@
'commons': u'\n{{Dupe|__image__}}',
'en' : None,
'it' : u'\n{{Progetto:Coordinamento/Immagini/Bot/Template duplicati|__images__}}',
- 'ko' :'분류:그림 저작권 틀',
}
# Head of the message given to the author
duplicate_user_talk_head = {
@@ -1098,6 +1097,8 @@
list_licenses.extend(pages)
"""
catName = wikipedia.translate(self.site, category_with_licenses)
+ if catName == None:
+ raise wikipedia.Error(u'No licenses allowed provided, add that option to the code to make the script working correctly')
wikipedia.output(u'\n\t...Loading the licenses allowed...\n')
list_licenses = categoryAllPageObjects(catName)
@@ -1127,6 +1128,8 @@
regex_find_licenses = re.compile(r'(?<!\{)\{\{(?:[Tt]emplate:|)([^{]*?)[|\n<}]', re.DOTALL)
templatesInTheImageRaw = regex_find_licenses.findall(self.imageCheckText)
allLicenses = list()
+ if self.list_licenses == []:
+ raise wikipedia.Error(u'No licenses allowed provided, add that option to the code to make the script working correctly')
# Found the templates ONLY in the image's description
for template_selected in templatesInTheImageRaw:
for templateReal in self.licenses_found:
More information about the Pywikipedia-l
mailing list