Skip to content

Commit

Permalink
Py3: [skip ci] fix export of JSON file in Arch
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 11, 2020
1 parent 896e774 commit 64630ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/Arch/importJSON.py
Expand Up @@ -23,6 +23,7 @@

import FreeCAD, Mesh, Draft, Part
import json
import six

if FreeCAD.GuiUp:
import FreeCADGui
Expand All @@ -48,7 +49,10 @@ def export(exportList, filename):
}

# Write file
outfile = pythonopen(filename, "wb")
if six.PY2:
outfile = pythonopen(filename, "wb")
else:
outfile = pythonopen(filename, "w")
json.dump(data, outfile, separators = (',', ':'))
outfile.close()

Expand Down

0 comments on commit 64630ad

Please sign in to comment.