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

Change subject: Change pageids validation to more error resilient
......................................................................

Change pageids validation to more error resilient

Method will not fail for any pageid that don't meet positive integer standard,
instead it will be just omitted.

Bug: T153592
Change-Id: If87bbdbbe0631cb9d829dda6e070a01052df7e28
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/44/328044/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 12a40f4..b4aa53c 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3136,7 +3136,7 @@
             pageids = [p.strip() for p in pageids]
 
         # Validate pageids.
-        gen = (str(int(p)) for p in pageids if int(p) > 0)
+        gen = (str(int(p)) for p in pageids if str(p).isdigit())
 
         # Find out how many pages can be specified at a time.
         parameter = self._paraminfo.parameter('query+info', 'prop')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If87bbdbbe0631cb9d829dda6e070a01052df7e28
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul <tomasz.magul...@gmail.com>

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

Reply via email to