Skip to content

Commit

Permalink
io: Add newline at the end of saved .gcode
Browse files Browse the repository at this point in the history
  • Loading branch information
xlxs4 committed Dec 16, 2022
1 parent eac413d commit a1a15af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/IOUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ def read_gcode(filename: Path) -> lines:
def _write_line_by_line(filename: Path, lines: lines):
lines = _lines_to_str_lines(lines)
with open(filename, 'w+') as file:
for line in lines[:-1]:
for line in lines:
file.write(line + '\n')
file.write(lines[-1])


def write_gcode(filename: Path, lines: lines):
Expand Down

0 comments on commit a1a15af

Please sign in to comment.