From 5c19d126a44c343e5b15ae0dadda6ce0fc2b9b44 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 14 Sep 2017 13:52:40 +1000 Subject: Normalize whitespace. --- scripts/FileGenerator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/FileGenerator.py') diff --git a/scripts/FileGenerator.py b/scripts/FileGenerator.py index 3d488ef13..7022769fb 100644 --- a/scripts/FileGenerator.py +++ b/scripts/FileGenerator.py @@ -28,7 +28,7 @@ def UpdateFile(filename, updated): # Same as before so don't write return os.unlink(filename) - except IOError: # File is not there yet + except IOError: # File is not there yet newOrChanged = "New" with codecs.open(filename, "w", "utf-8") as outfile: outfile.write(updated) @@ -175,13 +175,13 @@ def ReadFileAsList(path): """ with codecs.open(path, "rU", "utf-8") as f: return [l.rstrip('\n') for l in f] - + def UpdateFileFromLines(path, lines, lineEndToUse): """Join the lines with the lineEndToUse then update file if the result is different. """ contents = lineEndToUse.join(lines) + lineEndToUse UpdateFile(path, contents) - + def FindSectionInList(lines, markers): """Find a section defined by an initial start marker, an optional secondary marker and an end marker. -- cgit v1.2.3