jenkins-bot has submitted this change and it was merged.
Change subject: User: check that the '_userprops' attribute exists before deleting it ......................................................................
User: check that the '_userprops' attribute exists before deleting it
Otherwise an AttributeError might be raised if it hasn't been loaded yet.
Change-Id: I37428175177e4f1b4811b19465a5783ff565d995 --- M pywikibot/page.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index 446bbe0..b01fce7 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2733,7 +2733,7 @@
@return: dict """ - if force: + if force and hasattr(self, '_userprops'): del self._userprops if not hasattr(self, '_userprops'): self._userprops = list(self.site.users([self.username, ]))[0]
pywikibot-commits@lists.wikimedia.org