jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354719 )

Change subject: Page might have been moved without redirect or deleted. Test if 
the page actually exists.
......................................................................


Page might have been moved without redirect or deleted.
Test if the page actually exists.

Bug: T86491
Change-Id: Id5b6b0799bcac2aa69b26e9e8a7dd86e282f95c9
---
M scripts/newitem.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/scripts/newitem.py b/scripts/newitem.py
index 5ee4901..52ca0b6 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -94,6 +94,9 @@
 
         self.current_page = page
 
+        if not page.exists():
+            pywikibot.output('%s does not exist. Skipping.' % page)
+            return
         if page.isRedirectPage():
             pywikibot.output(u'%s is a redirect page. Skipping.' % page)
             return

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5b6b0799bcac2aa69b26e9e8a7dd86e282f95c9
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Multichill <[email protected]>
Gerrit-Reviewer: Lokal Profil <[email protected]>
Gerrit-Reviewer: Magul <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Multichill <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to