jenkins-bot merged this change.
[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(-)
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 change 425855. To unsubscribe, visit settings.