forked from platformio/platformio-core
Fix UnicodeEncodeError when SourceForge doesn't response
This commit is contained in:
@ -134,7 +134,7 @@ def get_api_result(path, params=None, data=None):
|
|||||||
raise APIRequestError(
|
raise APIRequestError(
|
||||||
"Could not connect to PlatformIO Registry Service")
|
"Could not connect to PlatformIO Registry Service")
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise APIRequestError("Invalid response: %s" % r.text)
|
raise APIRequestError("Invalid response: %s" % r.text.encode("utf-8"))
|
||||||
finally:
|
finally:
|
||||||
if r:
|
if r:
|
||||||
r.close()
|
r.close()
|
||||||
|
Reference in New Issue
Block a user