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")