Add skipkeys flag to writing plugin metadata to workspace

CURA-6627
This commit is contained in:
Jaime van Kessel 2020-01-16 11:19:29 +01:00
parent b8dbc1d160
commit 4e0e0c0339
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -89,7 +89,7 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
# We have to set the compress type of each file as well (it doesn't keep the type of the entire archive) # We have to set the compress type of each file as well (it doesn't keep the type of the entire archive)
file_in_archive.compress_type = zipfile.ZIP_DEFLATED file_in_archive.compress_type = zipfile.ZIP_DEFLATED
import json import json
archive.writestr(file_in_archive, json.dumps(metadata, separators = (", ", ": "), indent = 4)) archive.writestr(file_in_archive, json.dumps(metadata, separators = (", ", ": "), indent = 4, skipkeys = True))
## Helper function that writes ContainerStacks, InstanceContainers and DefinitionContainers to the archive. ## Helper function that writes ContainerStacks, InstanceContainers and DefinitionContainers to the archive.
# \param container That follows the \type{ContainerInterface} to archive. # \param container That follows the \type{ContainerInterface} to archive.