Mpaa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/173113

Change subject: allpages.py: fix namespace param instance checking
......................................................................

allpages.py: fix namespace param instance checking

Namespace param can also be a Namespace object and not only an int.

Bug: 73214

Change-Id: I306ad0933b5836c86bcd105a820a0fd8ca78358f
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/13/173113/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index ba1b00c..04ea873 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3046,7 +3046,8 @@
             (default False)
 
         """
-        if not isinstance(namespace, int):
+        if not (isinstance(namespace, int) or
+                isinstance(namespace, Namespace)):
             raise Error("allpages: only one namespace permitted.")
 
         if includeredirects is not None:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I306ad0933b5836c86bcd105a820a0fd8ca78358f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <[email protected]>

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

Reply via email to