FelixReimann has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87060
Change subject: Set _pageprops to {} per default before updating from live site
as - a page without any pageprops has no corresponding entry in the pagedict
and, thus, Page._pageprops will not be set in api.update_page() - the pageprops
may be removed after a forced upda
......................................................................
Set _pageprops to {} per default before updating from live site as
- a page without any pageprops has no corresponding entry in the pagedict and,
thus, Page._pageprops will not be set in api.update_page()
- the pageprops may be removed after a forced update
Change-Id: I557733ab88d43b4577678dfc0c36ae383bc7dce5
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/60/87060/1
diff --git a/pywikibot/page.py b/pywikibot/page.py
index eefc5d9..325477e 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -377,6 +377,7 @@
@return: dict
"""
if not hasattr(self, '_pageprops') or force:
+ self._pageprops = {} # page may not have pageprops (see bug 54868)
self.site.loadpageprops(self)
return self._pageprops
--
To view, visit https://gerrit.wikimedia.org/r/87060
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I557733ab88d43b4577678dfc0c36ae383bc7dce5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: FelixReimann <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits