jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/516273 )
Change subject: [IMPR] make Family.langs property more robust ......................................................................
[IMPR] make Family.langs property more robust
Don't include closed wikis to family files with wikimedia_sites.py.
code is used as a local variable but assigning to cls.codes may cause side effects and cls.codes could be be overwritten. Use a copy of cls.codes instead.
Bug: T226934 Change-Id: I97e3ad1f9214e29927b4ed4d952a65eefcb68d10 --- M pywikibot/family.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py index 1ef3d45..27a1d64 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1568,7 +1568,7 @@ @classproperty def langs(cls): """Property listing family languages.""" - codes = cls.codes + codes = cls.codes[:]
if hasattr(cls, 'test_codes'): codes += cls.test_codes