mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Remote diagnoser also returns code 400 or 418 when port / http ain't correctly exposed
This commit is contained in:
parent
786f2b2ddf
commit
526a3a25c9
2 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ class PortsDiagnoser(Diagnoser):
|
|||
|
||||
try:
|
||||
r = requests.post('https://diagnosis.yunohost.org/check-ports', json={'ports': ports.keys()}, timeout=30)
|
||||
if r.status_code != 200:
|
||||
if r.status_code not in [200, 400, 418]:
|
||||
raise Exception("Bad response from the server https://diagnosis.yunohost.org/check-ports : %s - %s" % (str(r.status_code), r.content))
|
||||
r = r.json()
|
||||
if "status" not in r.keys():
|
||||
|
|
|
@ -29,7 +29,7 @@ class WebDiagnoser(Diagnoser):
|
|||
|
||||
try:
|
||||
r = requests.post('https://diagnosis.yunohost.org/check-http', json={'domain': domain, "nonce": nonce}, timeout=30)
|
||||
if r.status_code != 200:
|
||||
if r.status_code not in [200, 400, 418]:
|
||||
raise Exception("Bad response from the server https://diagnosis.yunohost.org/check-http : %s - %s" % (str(r.status_code), r.content))
|
||||
r = r.json()
|
||||
if "status" not in r.keys():
|
||||
|
|
Loading…
Add table
Reference in a new issue