Profile export now goes via the plugin system, and does the same filename checks as before.

Contributed to CURA-1667 Profile import/export
This commit is contained in:
Simon Edwards 2016-06-08 14:40:10 +02:00
parent d57e2b2e22
commit c03588c6e5
6 changed files with 9 additions and 6 deletions

View file

@ -16,10 +16,10 @@ class CuraProfileWriter(ProfileWriter):
# \return \code True \endcode if the writing was successful, or \code
# False \endcode if it wasn't.
def write(self, path, profile):
serialised = profile.serialise()
serialized = profile.serialize()
try:
with SaveFile(path, "wt", -1, "utf-8") as f: # Open the specified file.
f.write(serialised)
f.write(serialized)
except Exception as e:
Logger.log("e", "Failed to write profile to %s: %s", path, str(e))
return False