From 1809c6cf01cfe28e4f2abe1c31c0bf6c19e1ef76 Mon Sep 17 00:00:00 2001 From: jffmichi <> Date: Wed, 14 May 2025 22:00:11 +0200 Subject: [PATCH] CAM: fix rrf postprocessor always writing to "-" instead of specified file --- src/Mod/CAM/Path/Post/scripts/rrf_post.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Mod/CAM/Path/Post/scripts/rrf_post.py b/src/Mod/CAM/Path/Post/scripts/rrf_post.py index b72cec3c69..9023aaafb4 100644 --- a/src/Mod/CAM/Path/Post/scripts/rrf_post.py +++ b/src/Mod/CAM/Path/Post/scripts/rrf_post.py @@ -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():