Revision: 7182 Author: filnik Date: 2009-08-27 13:02:48 +0000 (Thu, 27 Aug 2009)
Log Message: ----------- Bugfix: when report for a duplicate, now it will catch if the same image has been reported or not
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2009-08-27 12:47:00 UTC (rev 7181) +++ trunk/pywikipedia/checkimages.py 2009-08-27 13:02:48 UTC (rev 7182) @@ -953,7 +953,7 @@ if len(images_to_tag_list) != 0 and not only_report: already_reported_in_past = self.countEdits(u'File:%s' % images_to_tag_list[-1], self.botolist) image_to_resub = images_to_tag_list[-1] - from_regex = r'\n*[[:%s]]' % re.escape(self.image_namespace + image_to_resub) + from_regex = r'\n*[[:File:%s]]' % re.escape(self.convert_to_url(self.imageName)) # Delete the image in the list where we're write on text_for_the_report = re.sub(from_regex, '', text_for_the_report) # if you want only one edit, the edit found should be more than 0 -> num - 1