jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364969 )
Change subject: [bugfix] only change the first occurence of 'language_by_size' ......................................................................
[bugfix] only change the first occurence of 'language_by_size'
Bug: T170527 Change-Id: I54cca4a893237dcd896ba55d1fc616f72fafcaeb --- M scripts/maintenance/wikimedia_sites.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/maintenance/wikimedia_sites.py b/scripts/maintenance/wikimedia_sites.py index 38054ab..0fe2e3a 100755 --- a/scripts/maintenance/wikimedia_sites.py +++ b/scripts/maintenance/wikimedia_sites.py @@ -86,7 +86,7 @@ family_file = codecs.open(family_file_name, 'r', 'utf8') family_text = family_file.read() family_text = re.sub(r'(?msu)^ {8}self.languages_by_size.+?]', - text, family_text) + text, family_text, 1) with codecs.open(family_file_name, 'w', 'utf8') as family_file: family_file.write(family_text)
pywikibot-commits@lists.wikimedia.org