From cfd2fd32a169ce5f6e05b9091eab9c6aa570214c Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 8 Feb 2021 14:58:50 +0000 Subject: [PATCH] Now checks openscad.echo for warnings when used instead of openscad.log. --- scripts/openscad.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/openscad.py b/scripts/openscad.py index bfc2f32..5feb7bc 100644 --- a/scripts/openscad.py +++ b/scripts/openscad.py @@ -32,7 +32,8 @@ def run_list(args, silent = False, verbose = False): print() with open("openscad.log", "w") as log: rc = subprocess.call(cmd, stdout = log, stderr = log) - for line in open("openscad.log", "rt"): + log_file = "openscad.echo" if "openscad.echo" in cmd else "openscad.log" + for line in open(log_file, "rt"): if verbose or 'ERROR:' in line or 'WARNING:' in line: print(line[:-1]) if rc: