aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/commands.py
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2024-08-26 10:01:57 +1000
committerNick Brassel <[email protected]>2024-08-26 10:01:57 +1000
commit5d76c5280dc0aff398cdce19fa54d0e0725c418d (patch)
tree40026340f0d524a6006f18f01ef988e15d271075 /lib/python/qmk/commands.py
parente6a898e3eea3521d3f0497ee26937d5269d78fb7 (diff)
parent81dcf2b547bacc42bd9cf8ccaccd3d7164e69926 (diff)
downloadqmk_firmware-5d76c5280dc0aff398cdce19fa54d0e0725c418d.tar.gz
qmk_firmware-5d76c5280dc0aff398cdce19fa54d0e0725c418d.zip
Merge branch 'develop'0.26.0
Diffstat (limited to 'lib/python/qmk/commands.py')
-rw-r--r--lib/python/qmk/commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index 459858ab2c..97d9c5032c 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -113,7 +113,9 @@ def dump_lines(output_file, lines, quiet=True):
cli.log.info(f'No changes to {output_file.name}.')
return
output_file.replace(output_file.parent / (output_file.name + '.bak'))
- output_file.write_text(generated, encoding='utf-8')
+ with open(output_file, 'w', encoding='utf-8', newline='\n') as f:
+ f.write(generated)
+ # output_file.write_text(generated, encoding='utf-8', newline='\n') # `newline` needs Python 3.10
if not quiet:
cli.log.info(f'Wrote {output_file.name} to {output_file}.')