Skip to content

Commit 0994596

Browse files
committed
Use Filesystem encoding when decoding stdout
1 parent 13ffe99 commit 0994596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbed/mbed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ def pquery(command, output_callback=None, stdin=None, **kwargs):
274274
stdout, _ = proc.communicate(stdin)
275275

276276
if very_verbose:
277-
log(stdout.decode("utf-8").strip() + "\n")
277+
log(stdout.decode(sys.getfilesystemencoding()).strip() + "\n")
278278

279279
if proc.returncode != 0:
280280
raise ProcessException(proc.returncode, command[0], ' '.join(command), getcwd())
281281

282-
return stdout.decode("utf-8")
282+
return stdout.decode(sys.getfilesystemencoding())
283283

284284
def rmtree_readonly(directory):
285285
if os.path.islink(directory):

0 commit comments

Comments
 (0)