Py3: [skip ci] fix export of JSON file in Arch

This commit is contained in:
wmayer
2020-07-11 14:26:14 +02:00
parent da4ee7e526
commit 8cdb1a6cbc

View File

@@ -23,6 +23,7 @@
import FreeCAD, Mesh, Draft, Part
import json
import six
if FreeCAD.GuiUp:
import FreeCADGui
@@ -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()