Skip to content

Commit 922d4f8

Browse files
committed
[genpinmap] Create new file with LF line endings
Signed-off-by: Frederic Pillon <[email protected]>
1 parent be1f3bd commit 922d4f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/genpinmap/genpinmap_arduino.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ def parse_pins():
913913
config_file = open(config_filename, "r")
914914
except IOError:
915915
print("Please set your configuration in '%s' file" % config_filename)
916-
config_file = open(config_filename, "w")
916+
config_file = open(config_filename, "w", newline='\n')
917917
if sys.platform.startswith("win32"):
918918
print("Platform is Windows")
919919
cubemxdir = (
@@ -1024,10 +1024,10 @@ def parse_pins():
10241024
# open output file
10251025
if os.path.isfile(output_c_filename):
10261026
os.remove(output_c_filename)
1027-
out_c_file = open(output_c_filename, "w")
1027+
out_c_file = open(output_c_filename, "w", newline='\n')
10281028
if os.path.isfile(output_h_filename):
10291029
os.remove(output_h_filename)
1030-
out_h_file = open(output_h_filename, "w")
1030+
out_h_file = open(output_h_filename, "w", newline='\n')
10311031

10321032
# open input file
10331033
xml_mcu = parse(input_file_name)

0 commit comments

Comments
 (0)