From 856930eef6d2d63bdd71ea99f3c1a9fa7b438e03 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 22 Dec 2022 12:19:32 +0100 Subject: [PATCH] Fix missing grep input in sort1 tool --- tools/filters/sorter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/filters/sorter.py b/tools/filters/sorter.py index e9ccb53d9a01..50e81ddb419f 100644 --- a/tools/filters/sorter.py +++ b/tools/filters/sorter.py @@ -41,7 +41,8 @@ def main(): # grep comments grep_comments = ["grep", "^#"] - exit_code = subprocess.call(grep_comments, stdout=output_fh) + exit_code = subprocess.call(grep_comments, stdin=input_fh, stdout=output_fh) + input_fh.seek(0) if exit_code not in [0, 1]: stop_err("Searching for comment lines failed")