mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
make romfs pruner script windows compatible
When we open the file handle to write back the lines in binary mode, we don't change the line endings but instead leave them as they were before. This is impotant for Windows users as Python on Windows otherwise adds CRLF endings to the parameter files and they can't be correctly parsed by NuttX any more.
This commit is contained in:
parent
8937499f26
commit
5191731f22
@ -76,7 +76,7 @@ def main():
|
||||
pruned_content += line
|
||||
|
||||
# overwrite old scratch file
|
||||
with open(file_path, "w") as f:
|
||||
with open(file_path, "wb") as f:
|
||||
f.write(pruned_content)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user