Now checks openscad.echo for warnings when used instead of openscad.log.

This commit is contained in:
Chris Palmer 2021-02-08 14:58:50 +00:00
parent f573a91a09
commit cfd2fd32a1

View File

@ -32,7 +32,8 @@ def run_list(args, silent = False, verbose = False):
print() print()
with open("openscad.log", "w") as log: with open("openscad.log", "w") as log:
rc = subprocess.call(cmd, stdout = log, stderr = 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: if verbose or 'ERROR:' in line or 'WARNING:' in line:
print(line[:-1]) print(line[:-1])
if rc: if rc: