Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/281596

Change subject: [bugfix] Solve TypeError: unsupported operand type
......................................................................

[bugfix] Solve TypeError: unsupported operand type

checkimages is not localized for all sites.
The script failed when trying to report duplicate files on an user talk page.
Now check whether the message exists.

Bug: T131574
Change-Id: Icd4571550461adcbe9d37bbc03ad0e77f0e65086
---
M scripts/checkimages.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/281596/1

diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 213ab96..d77c2cb 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1020,7 +1020,8 @@
                                                  text_for_the_report)
                     # if you want only one edit, the edit found should be more
                     # than 0 -> num - 1
-                    if already_reported_in_past > duplicates_rollback - 1:
+                    if already_reported_in_past > duplicates_rollback - 1 or \
+                            not dupTalkText:
                         only_report = True
                     else:
                         self.report(text_for_the_report, 
images_to_tag_list[-1],

-- 
To view, visit https://gerrit.wikimedia.org/r/281596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd4571550461adcbe9d37bbc03ad0e77f0e65086
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to