Fix utf8 errors

Fix #681
This commit is contained in:
Julien Duponchelle
2016-09-18 22:23:52 +02:00
parent ac8bd3fec4
commit cf10f02a8d
2 changed files with 3 additions and 3 deletions

View File

@ -648,7 +648,7 @@ class Project:
topo = project_to_topology(self)
path = self._topology_file()
log.debug("Write %s", path)
with open(path + ".tmp", "w+") as f:
with open(path + ".tmp", "w+", encoding="utf-8") as f:
json.dump(topo, f, indent=4, sort_keys=True)
shutil.move(path + ".tmp", path)
except OSError as e: