jenkins-bot merged this change.
[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(-)
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
To view, visit change 516273. To unsubscribe, or for help writing mail filters, visit settings.