mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Cleaned up docs gen error reporting.
This commit is contained in:
parent
c4ceed4e21
commit
1ce899c412
2 changed files with 4 additions and 2 deletions
|
@ -144,11 +144,13 @@ def run_openscad_script(libfile, infile, imgfile, imgsize=(320,240), eye=None, s
|
||||||
if render: # Force render
|
if render: # Force render
|
||||||
scadcmd.extend(["--render", ""])
|
scadcmd.extend(["--render", ""])
|
||||||
scadcmd.append(infile)
|
scadcmd.append(infile)
|
||||||
|
with open(infile, "r") as f:
|
||||||
|
script = "".join(f.readlines());
|
||||||
p = subprocess.Popen(scadcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
p = subprocess.Popen(scadcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
|
||||||
(stdoutdata, stderrdata) = p.communicate(None)
|
(stdoutdata, stderrdata) = p.communicate(None)
|
||||||
res = p.returncode
|
res = p.returncode
|
||||||
if res != 0 or b"ERROR:" in stderrdata or b"WARNING:" in stderrdata:
|
if res != 0 or b"ERROR:" in stderrdata or b"WARNING:" in stderrdata:
|
||||||
print("%s"%stderrdata)
|
print("\n\n{}".format(stderrdata.decode('utf-8')))
|
||||||
print("////////////////////////////////////////////////////")
|
print("////////////////////////////////////////////////////")
|
||||||
print("// {}: {} for {}".format(libfile, infile, imgfile))
|
print("// {}: {} for {}".format(libfile, infile, imgfile))
|
||||||
print("////////////////////////////////////////////////////")
|
print("////////////////////////////////////////////////////")
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,72];
|
BOSL_VERSION = [2,0,73];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue