Allow '405 method not allowed' in URL diagnostics

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2017-04-05 12:06:43 +05:30
parent 3494098251
commit 8059e6d12c
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -323,7 +323,7 @@ def diagnose_url(url, kind=None, env=None, check_certificate=True,
except subprocess.CalledProcessError as exception:
result = 'failed'
# Authorization failed is a success
if exception.stdout.decode().strip() == '401':
if exception.stdout.decode().strip() in ('401', '405'):
result = 'passed'
except FileNotFoundError:
result = 'error'