diff options
author | Zufu Liu <unknown> | 2017-09-14 13:52:40 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2017-09-14 13:52:40 +1000 |
commit | 5c19d126a44c343e5b15ae0dadda6ce0fc2b9b44 (patch) | |
tree | 72744423093f26e15ed86dbd5bf635889b04ef3e /scripts/FileGenerator.py | |
parent | dce400533381d1b5bec8a9bb0e809d1cbb8a66d9 (diff) | |
download | scintilla-mirror-5c19d126a44c343e5b15ae0dadda6ce0fc2b9b44.tar.gz |
Normalize whitespace.
Diffstat (limited to 'scripts/FileGenerator.py')
-rw-r--r-- | scripts/FileGenerator.py | 6 |
1 files changed, 3 insertions, 3 deletions
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. |