CAM: fix rrf postprocessor always writing to "-" instead of specified file

This commit is contained in:
jffmichi
2025-05-14 22:00:11 +02:00
parent bb409986f7
commit 1809c6cf01

View File

@@ -35,6 +35,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 = "2021-10-21" # Revision date for this file.
@@ -443,8 +444,12 @@ 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
def linenumber():