jenkins-bot has submitted this change and it was merged.
Change subject: Skip adding sitelink when already another page exists ......................................................................
Skip adding sitelink when already another page exists
It can happen due to interwiki conflicts
Bug: T117413 Change-Id: I02ee73688b23a61640563ffb7fda80c769d2fa08 --- M scripts/interwikidata.py 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py index 22e8a60..1d3c1f3 100644 --- a/scripts/interwikidata.py +++ b/scripts/interwikidata.py @@ -162,6 +162,10 @@ self.current_page.title(asLink=True)) return False item = list(wd_data).pop() + if self.current_page.site.dbName() in item.sitelinks: + warning('Interwiki conflict in %s, skipping...' % + item.title(asLink=True)) + return False output('Adding link to %s' % item.title()) item.setSitelink(self.current_page) return item
pywikibot-commits@lists.wikimedia.org