jenkins-bot merged this change.
[bugfix] Raise AttributeError in Site if the family attribute is not callable
Bug: T195088
Change-Id: Ic05dd51aec28fea167f16df662a52f1987985663
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 2eb4141..1ca42dd 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -896,6 +896,8 @@
return getattr(self.__class__, attr)
try:
method = getattr(self.family, attr)
+ if not callable(method):
+ raise AttributeError
f = functools.partial(method, self.code)
if hasattr(method, "__doc__"):
f.__doc__ = method.__doc__
To view, visit change 434051. To unsubscribe, or for help writing mail filters, visit settings.