jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/425855 )
Change subject: [bugfix] fix cache attribute Page._depth
......................................................................
[bugfix] fix cache attribute Page._depth
currently the depth isn't cached
Change-Id: I192c791d626a25a3c3384653c8d9f6c51e3ba51b
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Framawiki: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 46a43e1..1eac027 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -274,12 +274,12 @@
if not hasattr(self, '_depth'):
# Check if the namespace allows subpages
if self._namespace_obj.subpages:
- _depth = self.title().count('/')
+ self._depth = self.title().count('/')
else:
# Does not allow subpages, which means depth is always 0
- _depth = 0
+ self._depth = 0
- return _depth
+ return self._depth
@property
def pageid(self):
--
To view, visit
https://gerrit.wikimedia.org/r/425855
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I192c791d626a25a3c3384653c8d9f6c51e3ba51b
Gerrit-Change-Number: 425855
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Framawiki <framawiki(a)tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>