Mpaa has uploaded a new change for review.

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

Change subject: Page.namespace() shall return Namespace() for pages in Main ns
......................................................................

Page.namespace() shall return Namespace() for pages in Main ns

For pages in Main ns, page.namespace() shall return a Namespace()
object instead on an int().

Bug: T131007

Change-Id: I15667db612b5e3d7a65319e203065a0b33aa45ad
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/26/279726/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index c0c8294..2481d2f 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4873,7 +4873,7 @@
             self._source = source or pywikibot.Site()
 
         self._text = text
-        self._defaultns = defaultNamespace
+        self._defaultns = self._source.namespaces[defaultNamespace]
 
         # preprocess text (these changes aren't site-dependent)
         # First remove anchor, which is stored unchanged, if there is one

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15667db612b5e3d7a65319e203065a0b33aa45ad
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