CAM: prevent marlin postprocessor from always writing to "-"

This commit is contained in:
jffmichi
2025-05-14 21:55:49 +02:00
parent 82a473ee59
commit bb409986f7

View File

@@ -36,6 +36,7 @@ import Path
import Path.Base.Util as PathUtil
import Path.Post.Utils as PostUtils
import PathScripts.PathUtils as PathUtils
from builtins import open as pyopen
Revised = "2020-11-03" # Revision date for this file.
@@ -450,8 +451,10 @@ def export(objectslist, filename, argstring):
print("Done postprocessing.")
# Write the file:
with open(filename, "w") as fp:
fp.write(final)
if not filename == "-":
gfile = pyopen(filename, "w")
gfile.write(final)
gfile.close()
return final