forked from platformio/platformio-core
Fix config saving when PY2 is used
This commit is contained in:
1 parent
ba441ca77c
commit
e5aa71e4e1
1 file changed
+1
-1
@@ -451,7 +451,7 @@ class ProjectConfig(ProjectConfigBase, ProjectConfigDirsMixin):
|
||||
del self._instances[path]
|
||||
with open(path or self.path, "w") as fp:
|
||||
fp.write(CONFIG_HEADER.strip())
|
||||
buf = io.StringIO()
|
||||
buf = io.BytesIO() if PY2 else io.StringIO()
|
||||
self._parser.write(buf)
|
||||
fp.write("\n\n%s\n" % buf.getvalue().strip())
|
||||
return True
|
||||
Reference in new issue
Block a user