mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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:
parent
d57e2b2e22
commit
c03588c6e5
6 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue