1234567891011121314151617181920212223242526 |
- from UM.Logger import Logger
- from UM.SaveFile import SaveFile
- from cura.ProfileWriter import ProfileWriter
- class CuraProfileWriter(ProfileWriter):
-
-
-
-
-
-
- def write(self, path, profile):
- serialized = profile.serialize()
- try:
- with SaveFile(path, "wt", -1, "utf-8") as f:
- f.write(serialized)
- except Exception as e:
- Logger.log("e", "Failed to write profile to %s: %s", path, str(e))
- return False
- return True
|