jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/434051 )
Change subject: [bugfix] Raise AttributeError in Site if the family attribute is not callable ......................................................................
[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(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
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__
pywikibot-commits@lists.wikimedia.org