John Vandenberg has uploaded a new change for review.

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

Change subject: Instantiate empty ItemPage with empty attributes
......................................................................

Instantiate empty ItemPage with empty attributes

ItemPage.claims and ItemPage.sitelinks are missing when an
empty ItemPage is instantiated.

Change-Id: I0329c41caaa5c14a45ebcc5ff7e1304b8c18d6ae
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/76/201876/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 0cdcbc8..b9e47d9 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3378,6 +3378,8 @@
         if title is None or title == '-1':
             super(ItemPage, self).__init__(site, u'-1', ns=ns)
             self.id = u'-1'
+            self.claims = {}
+            self.sitelinks = {}
             return
 
         super(ItemPage, self).__init__(site, title, ns=ns)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0329c41caaa5c14a45ebcc5ff7e1304b8c18d6ae
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

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

Reply via email to