jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] checkimages: Convert generator to iterator ......................................................................
[FIX] checkimages: Convert generator to iterator
With ff628236 the general handling of the script changed and with that it also now used duplicates based on the hash differently. It tried to step through the generator but that is not possible without turning them first into a iterator.
Bug: T105188 Change-Id: I02791b150b000beda86b7510663badaf842b41ba --- M scripts/checkimages.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/checkimages.py b/scripts/checkimages.py index 1b50c33..5ea917b 100755 --- a/scripts/checkimages.py +++ b/scripts/checkimages.py @@ -913,8 +913,8 @@ regexOnCommons = (r"[[:File:%s]] is also on '''Commons''': " r"[[commons:File:.*?]](?: (same name))?$" % re.escape(self.imageName)) - commons_image_with_this_hash = next(site.allimages(sha1=hash_found, - total=1), None) + commons_image_with_this_hash = next(iter(site.allimages(sha1=hash_found, + total=1)), None) if commons_image_with_this_hash: servTMP = pywikibot.translate(self.site, serviceTemplates) templatesInTheImage = self.image.templates()