Skip SF 5xx errors

This commit is contained in:
Ivan Kravets
2015-06-03 19:14:10 +03:00
parent ba20459178
commit 23cf725c20

View File

@ -56,7 +56,7 @@ def test_package(package_data, sfpkglist):
# check content type and that file exists
try:
r = requests.head(package_data['url'], allow_redirects=True)
if r.status_code == 504:
if 500 <= r.status_code <= 599:
raise requests.exceptions.ConnectionError()
except requests.exceptions.ConnectionError:
return pytest.skip("SF is off-line")