Fix UnicodeEncodeError when SourceForge doesn't response

This commit is contained in:
Ivan Kravets
2015-02-08 22:49:29 +02:00
parent ebd2e31efe
commit 2bce970809

View File

@ -134,7 +134,7 @@ def get_api_result(path, params=None, data=None):
raise APIRequestError(
"Could not connect to PlatformIO Registry Service")
except ValueError:
raise APIRequestError("Invalid response: %s" % r.text)
raise APIRequestError("Invalid response: %s" % r.text.encode("utf-8"))
finally:
if r:
r.close()