shithub: pokecrystal

Download patch

ref: 78c818e4c9e8b126bd071b871367aaf8b42eca6e
parent: c85e4f3d52fa977dd72040ac7ed3b48740676930
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Wed Jan 3 10:35:25 EST 2018

for/write → writelines

--- a/tools/sort_map.py
+++ b/tools/sort_map.py
@@ -25,7 +25,7 @@
 	}
 	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 @@
 	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()