Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/362235 )

Change subject: [Bugfix] Fix interwiki conflict detection
......................................................................

[Bugfix] Fix interwiki conflict detection

I think the previous code was error. If set of wikis linked
via interwiki is subset of those linked via Wikidata, it's ok.

The correct operation should be subtraction, ie. whether there
is something we have and Wikidata does not.

Bug: T168575
Change-Id: I92768d5ab975e9d698d79e938a20088c0dba56e4
---
M scripts/interwikidata.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/35/362235/1

diff --git a/scripts/interwikidata.py b/scripts/interwikidata.py
index f4c23d5..ebd1723 100644
--- a/scripts/interwikidata.py
+++ b/scripts/interwikidata.py
@@ -142,7 +142,7 @@
         if not self.iwlangs:
             return
         dbnames = [iw_site.dbName() for iw_site in self.iwlangs]
-        if set(dbnames) < set(self.current_item.sitelinks.keys()):
+        if set(dbnames) - set(self.current_item.sitelinks.keys()):
             if not self.handle_complicated():
                 warning('Interwiki conflict in %s, skipping...' %
                         self.current_page.title(asLink=True))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92768d5ab975e9d698d79e938a20088c0dba56e4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to