Codestyle & documentation

CURA-537
This commit is contained in:
Jaime van Kessel 2016-04-28 16:01:54 +02:00
parent efd14421cc
commit 9009fb9d3d
4 changed files with 36 additions and 23 deletions

View file

@ -6,6 +6,7 @@ from UM.Logger import Logger
from UM.SaveFile import SaveFile
from UM.Settings.ProfileWriter import ProfileWriter
## Writes profiles to Cura's own profile format with config files.
class CuraProfileWriter(ProfileWriter):
## Writes a profile to the specified file path.
@ -17,7 +18,7 @@ class CuraProfileWriter(ProfileWriter):
def write(self, path, profile):
serialised = profile.serialise()
try:
with SaveFile(path, "wt", -1, "utf-8") as f: #Open the specified file.
with SaveFile(path, "wt", -1, "utf-8") as f: # Open the specified file.
f.write(serialised)
except Exception as e:
Logger.log("e", "Failed to write profile to %s: %s", path, str(e))