Skip to content

Commit

Permalink
modifying response code check
Browse files Browse the repository at this point in the history
  • Loading branch information
NajmudheenCT committed Dec 23, 2020
1 parent 69e5d8b commit 495b31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion delfin/exporter/prometheus/alert_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def push_prometheus_alert(self, alerts):
response = requests.post('http://' + host + ":" + port +
'/api/v1/alerts',
json=self.alerts)
if response != 200:
if response.status_code != 200:
LOG.error("POST request failed for alert %s ",
alert.get('alert_id'))
except Exception:
Expand Down

0 comments on commit 495b31a

Please sign in to comment.