From 5191731f229b9fd6cfbd752fa16aca0f0b5f62a4 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Mon, 28 Sep 2015 21:28:30 +0200 Subject: [PATCH] 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. --- Tools/px_romfs_pruner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/px_romfs_pruner.py b/Tools/px_romfs_pruner.py index aef1cc7a3b..78e4e69f72 100644 --- a/Tools/px_romfs_pruner.py +++ b/Tools/px_romfs_pruner.py @@ -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)