Use native open/io.open for file contents reading/writing

This commit is contained in:
Ivan Kravets
2020-03-05 23:52:13 +02:00
parent 3275bb59bf
commit ce6b96ea84
10 changed files with 56 additions and 39 deletions
+2 -2
View File
@@ -18,7 +18,6 @@ from hashlib import md5
from os import makedirs
from os.path import isdir, isfile, join
from platformio import fs
from platformio.compat import WINDOWS, hashlib_encode_data
# Windows CLI has limit with command length to 8192
@@ -67,7 +66,8 @@ def _file_long_data(env, data):
)
if isfile(tmp_file):
return tmp_file
fs.write_file_contents(tmp_file, data)
with open(tmp_file, "w") as fp:
fp.write(data)
return tmp_file