jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/538384 )
Change subject: [bugfix] enable creating sites from url for closed wikis ...................................................................... [bugfix] enable creating sites from url for closed wikis >>> import pwb, pywikibot as py >>> s = py.Site(url='https://hz.wikipedia.org/wiki/$1') >>> s ClosedSite("hz", "wikipedia") >>> Bug: T233487 Change-Id: Ia8846d152ab7349a8f84913af03f84908de13b42 --- M pywikibot/family.py 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/family.py b/pywikibot/family.py index 2333640..f12ef93 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1309,7 +1309,10 @@ return None matched_sites = [] - for code in chain(self.codes, getattr(self, 'test_codes', ())): + for code in chain(self.codes, + getattr(self, 'test_codes', ()), + getattr(self, 'closed_wikis', ()), + ): if self._hostname(code)[1] == parsed.netloc: # Use the code and family instead of the url # This is only creating a Site instance if domain matches -- To view, visit https://gerrit.wikimedia.org/r/538384 To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia8846d152ab7349a8f84913af03f84908de13b42 Gerrit-Change-Number: 538384 Gerrit-PatchSet: 1 Gerrit-Owner: Xqt <[email protected]> Gerrit-Reviewer: Dvorapa <[email protected]> Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________ Pywikibot-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits
