mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #40209 from sofixa/2016.11
change InfluxDB get_version to expect status code 204
This commit is contained in:
commit
0b00489eb2
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ def _get_version(host, port, user, password):
|
|||
# check the InfluxDB version via the HTTP API
|
||||
try:
|
||||
result = requests.get("http://{0}:{1}/ping".format(host, port), auth=(user, password))
|
||||
if result.status_code == 200 and influxDBVersionHeader in result.headers:
|
||||
if result.status_code == 204 and influxDBVersionHeader in result.headers:
|
||||
version = result.headers[influxDBVersionHeader]
|
||||
except Exception as ex:
|
||||
log.critical('Failed to query InfluxDB version from HTTP API within InfluxDB returner: {0}'.format(ex))
|
||||
|
|
Loading…
Add table
Reference in a new issue