XXN has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370368 )

Change subject: Don't create Wikidata items for category redirects.
......................................................................

Don't create Wikidata items for category redirects.

*T172621

Change-Id: Ie7c8f4204b1af1beb3260bd59f542743a9052552
---
M scripts/newitem.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/68/370368/2

diff --git a/scripts/newitem.py b/scripts/newitem.py
index f650b40..93310fe 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -109,6 +109,10 @@
                 u'Page creation of %s on %s is too recent. Skipping.'
                 % (page, page.editTime().isoformat()))
             return
+        if page.namespace() == 14:
+            if page.isCategoryRedirect():
+                pywikibot.output(u'%s is a category redirect. Skipping.' % 
page)
+                return
 
         if page.langlinks():
             # FIXME: Implement this

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7c8f4204b1af1beb3260bd59f542743a9052552
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XXN <dan10r...@gmail.com>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to