Skip to content

Commit

Permalink
ARCH: fix propper removing of tempfile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Aug 4, 2016
1 parent cfbde71 commit 8ab027b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mod/Arch/importIFC.py
Expand Up @@ -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]
Expand Down

0 comments on commit 8ab027b

Please sign in to comment.