diff options
author | Remy Oukaour <remy.oukaour@gmail.com> | 2018-01-03 15:35:25 -0500 |
---|---|---|
committer | Remy Oukaour <remy.oukaour@gmail.com> | 2018-01-03 15:35:25 -0500 |
commit | 78c818e4c9e8b126bd071b871367aaf8b42eca6e (patch) | |
tree | 2fd4df45587b13668e7798d9c06e18e6894de07f | |
parent | c85e4f3d52fa977dd72040ac7ed3b48740676930 (diff) |
for/write → writelines
-rw-r--r-- | tools/sort_map.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/sort_map.py b/tools/sort_map.py index dedeb3fd1..a5202e8e6 100644 --- a/tools/sort_map.py +++ b/tools/sort_map.py @@ -25,7 +25,7 @@ def total_bank_size(type): } return sizes[type] -def sorted_mapfile(input): +def map_to_sym(input): # analogous to ";File generated by rgblink" yield ';File generated by sort_map.py\n' @@ -117,10 +117,9 @@ def main(): output_filename = sys.argv[2] with open(input_filename, 'r') as infile: input = infile.readlines() - output = sorted_mapfile(input) + output = map_to_sym(input) with open(output_filename, 'w') as outfile: - for line in output: - outfile.write(line) + outfile.writelines(output) if __name__ == '__main__': main() |