mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-12-22 09:03:57 +01:00
Merge branch 'v2-1' into key-equals-empty
This commit is contained in:
commit
47a37556ba
@ -612,7 +612,7 @@ def main(cliargs):
|
||||
|
||||
except HTTPError as e:
|
||||
# Try to recover from HTTP Error, if there is JSON in the response
|
||||
if e.info().get_content_subtype() == "json":
|
||||
if "json" in e.info().get_content_subtype():
|
||||
json_data = e.read()
|
||||
else:
|
||||
nagios.append_unknown(" HTTPError[%s], url:%s" % (str(e.code), url))
|
||||
|
Loading…
Reference in New Issue
Block a user