forked from platformio/platformio-core
Fix response with 504 code when SF is off-line
This commit is contained in:
@ -56,6 +56,8 @@ def test_package(package_data, sfpkglist):
|
|||||||
# check content type and that file exists
|
# check content type and that file exists
|
||||||
try:
|
try:
|
||||||
r = requests.head(package_data['url'], allow_redirects=True)
|
r = requests.head(package_data['url'], allow_redirects=True)
|
||||||
|
if r.status_code == 504:
|
||||||
|
raise requests.exceptions.ConnectionError()
|
||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
return pytest.skip("SF is off-line")
|
return pytest.skip("SF is off-line")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user