Skip to content

Commit

Permalink
Use oposite operator
Browse files Browse the repository at this point in the history
  • Loading branch information
xtianae7 committed Aug 19, 2024
1 parent 7b55554 commit 5d73fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prom2teams/app/teams_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def simple_post(teams_webhook_url, message):

def _do_post(self, teams_webhook_url, message):
response = self.session.post(teams_webhook_url, data=message, timeout=self.timeout)
if not response.status_code == 202 and not (response.status_code == 200 and response.text == '1'):
if response.status_code != 202 and (response.status_code != 200 or response.text != '1'):
exception_msg = 'Error performing request to: {}.\n' \
' Returned status code: {}.\n' \
' Returned data: {}\n' \
Expand Down

0 comments on commit 5d73fbf

Please sign in to comment.