jenkins-bot has submitted this change and it was merged.
Change subject: Fix namespace pickling error
......................................................................
Fix namespace pickling error
unpickling calls __setstate__ which doesnt exist,
so __getattr__ loops indefinitely.
Change-Id: I9c4977154cac92c84ac7a50ffe8e00366987aaa7
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 5d38dbd..71f04c1 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -248,7 +248,7 @@
def __getattr__(self, attr):
"""Look for undefined attributes in info."""
- if attr in self.info:
+ if hasattr(self, 'info') and attr in self.info:
return self.info[attr]
else:
raise AttributeError("%s instance has no attribute '%s'"
--
To view, visit
https://gerrit.wikimedia.org/r/161096
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9c4977154cac92c84ac7a50ffe8e00366987aaa7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>