From 8ab027b2187d9f1072a047e7e27f252299ce0d5d Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 3 Aug 2016 18:00:54 +0200 Subject: [PATCH] ARCH: fix propper removing of tempfile on windows --- src/Mod/Arch/importIFC.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 3169c8154..4cbd46b3f 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -537,9 +537,10 @@ def insert(filename,docname,skip=[],only=[],root=None): # workaround to remove the bad placement: exporting/reimporting as step if not ex[0].Placement.isNull(): import tempfile - tf = tempfile.mkstemp(suffix=".stp")[1] + fd, tf = tempfile.mkstemp(suffix=".stp") ex[0].exportStep(tf) f = Part.read(tf) + os.close(fd) os.remove(tf) else: f = ex[0]