Revision: 5959 Author: filnik Date: 2008-10-12 11:41:49 +0000 (Sun, 12 Oct 2008)
Log Message: ----------- Little bugfix in the checkImageOnCommons function, the comparison wasn't so successful. Now it's better
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2008-10-11 17:18:37 UTC (rev 5958) +++ trunk/pywikipedia/checkimages.py 2008-10-12 11:41:49 UTC (rev 5959) @@ -813,7 +813,8 @@ wikipedia.output(u'%s has "stemma" inside, means that it's ok.' % self.image) return True # Problems? No, it's only not on commons but the image needs a check else: - if self.image == commons_image_with_this_hash[0]: + # the second usually is a url or something like that. Compare the two in equal way, both url. + if self.convert_to_url(self.image) == self.convert_to_url(commons_image_with_this_hash[0]): repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]] (same name)" % (self.image, commons_image_with_this_hash[0]) else: repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]]" % (self.image, commons_image_with_this_hash[0])