Skip to content

Commit

Permalink
Fix bugs in deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed Aug 23, 2024
1 parent 4324463 commit ab0e101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deployments/staging/hook-scripts/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def handle(self) -> None:
with urllib.request.urlopen(
request, data=json.dumps({"content": self.content}).encode("utf-8")
) as response:
if 299 <= response.status <= 200:
if 200 <= response.status <= 299:
print("notification sent")
else:
print(
Expand Down Expand Up @@ -345,7 +345,7 @@ def perform_deployment(
args = parser.parse_args()
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.WARNING)
webhook_url = None
if notification_url := os.getenv(discord_notification_env_var_name) is not None:
if (notification_url := os.getenv(discord_notification_env_var_name)) is not None:
if args.send_discord_notification:
webhook_url = notification_url
else:
Expand Down

0 comments on commit ab0e101

Please sign in to comment.