forked from platformio/platformio-core
Specify encoding for "open()" functions
This commit is contained in:
1 parent
b9219a2b62
commit
d819617d2b
28 files changed
+63
-43
No files matched your search
@@ -62,7 +62,9 @@ class LockFile(object):
|
||||
else:
|
||||
raise LockFileExists
|
||||
|
||||
self._fp = open(self._lock_path, "w") # pylint: disable=consider-using-with
|
||||
self._fp = open(
|
||||
self._lock_path, mode="w", encoding="utf8"
|
||||
) # pylint: disable=consider-using-with
|
||||
try:
|
||||
if LOCKFILE_CURRENT_INTERFACE == LOCKFILE_INTERFACE_FCNTL:
|
||||
fcntl.flock(self._fp.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
|
||||
Reference in new issue
Block a user