mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Fix issue with incorrect API result
This commit is contained in:
@ -23,7 +23,7 @@ from platformio.managers.package import PackageManager
|
||||
CORE_PACKAGES = {
|
||||
"contrib-piohome": ">=0.9.1,<2",
|
||||
"contrib-pysite": ">=0.2.0,<2",
|
||||
"tool-pioplus": ">=1.1.3,<2",
|
||||
"tool-pioplus": ">=1.1.6,<2",
|
||||
"tool-unity": "~1.20403.0",
|
||||
"tool-scons": "~2.20501.4"
|
||||
}
|
||||
|
@ -587,9 +587,9 @@ def _get_api_result(
|
||||
headers=headers,
|
||||
auth=auth,
|
||||
verify=verify_ssl)
|
||||
result = r.json()
|
||||
r.raise_for_status()
|
||||
r.json()
|
||||
result = r.text
|
||||
return r.text
|
||||
except requests.exceptions.HTTPError as e:
|
||||
if result and "message" in result:
|
||||
raise exception.APIRequestError(result['message'])
|
||||
@ -603,7 +603,7 @@ def _get_api_result(
|
||||
finally:
|
||||
if r:
|
||||
r.close()
|
||||
return result
|
||||
return None
|
||||
|
||||
|
||||
def get_api_result(url, params=None, data=None, auth=None, cache_valid=None):
|
||||
|
Reference in New Issue
Block a user