jenkins-bot has submitted this change and it was merged.
Change subject: Fix ItemPage.iterlinks when no family is given
......................................................................
Fix ItemPage.iterlinks when no family is given
In the old situation, the default family would be used (which is
incorrect). In the new situation, links are not filtered by family
unless explicitly given.
Change-Id: Idd19c9b0ef8d150d43848708d0f37cc28deeffde
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 4b99a31..077491f 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2599,11 +2599,11 @@
"""
if not hasattr(self, 'sitelinks'):
self.get()
- if not isinstance(family, pywikibot.family.Family):
+ if family is not None and not isinstance(family,
pywikibot.family.Family):
family = pywikibot.site.Family(family)
for dbname in self.sitelinks:
pg = Page(pywikibot.site.APISite.fromDBName(dbname),
self.sitelinks[dbname])
- if not family or family == pg.site.family:
+ if family is None or family == pg.site.family:
yield pg
def getSitelink(self, site, force=False):
--
To view, visit https://gerrit.wikimedia.org/r/83658
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idd19c9b0ef8d150d43848708d0f37cc28deeffde
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits