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():