From 828770f0d1ed635d4ab43ad6d0cf0ae36f339cb0 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 9 May 2020 16:59:30 -0400 Subject: Updated generation scripts for LongTerm3 use. --- scripts/FileGenerator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/FileGenerator.py') diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index 3e9662632..f52f55948 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -214,8 +214,8 @@ def FindSectionInList(lines, markers): raise Exception("Could not find end marker " + markers[2]) return slice(start, end) -def ReplaceREInFile(path, match, replace): +def ReplaceREInFile(path, match, replace, count=0): with codecs.open(path, "r", "utf-8") as f: contents = f.read() - contents = re.sub(match, replace, contents) + contents = re.sub(match, replace, contents, count) UpdateFile(path, contents) -- cgit v1.2.3