forked from platformio/platformio-core
Fixed an issue "the JSON object must be str, not 'bytes'" when PIO Home is used with Python 3.5 // Resolve #3396
This commit is contained in:
@ -10,6 +10,7 @@ PlatformIO Core 4
|
|||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* Fixed an issue when quitting from PlatformIO IDE does not shutdown PIO Home server
|
* Fixed an issue when quitting from PlatformIO IDE does not shutdown PIO Home server
|
||||||
|
* Fixed an issue "the JSON object must be str, not 'bytes'" when PIO Home is used with Python 3.5 (`issue #3396 <https://github.com/platformio/platformio-core/issues/3396>`_)
|
||||||
|
|
||||||
4.2.1 (2020-02-17)
|
4.2.1 (2020-02-17)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -146,6 +146,8 @@ class PIOCoreRPC(object):
|
|||||||
raise Exception(text)
|
raise Exception(text)
|
||||||
if not to_json:
|
if not to_json:
|
||||||
return text
|
return text
|
||||||
|
if is_bytes(out):
|
||||||
|
out = out.decode()
|
||||||
try:
|
try:
|
||||||
return json.loads(out)
|
return json.loads(out)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
Reference in New Issue
Block a user