From 623115295aa59a3a96ce99e988345a412a028cf9 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 18 Feb 2024 13:22:23 +0100 Subject: [PATCH] Optimize default URL fallback mechanism Refactored the assignment of FORGEJO_URL to use a more idiomatic fallback approach in case the environment variable is not set. This change ensures that None values are handled correctly and the default URL is used when the environment variable FORGEJO_URL is undefined, enhancing reliability. --- scripts/chores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/chores.py b/scripts/chores.py index ec8efdf..6217c48 100644 --- a/scripts/chores.py +++ b/scripts/chores.py @@ -7,7 +7,7 @@ import logging from datetime import datetime, timedelta -FORGEJO_URL = os.environ.get("FORGEJO_URL", "https://git.private.coffee") +FORGEJO_URL = os.environ.get("FORGEJO_URL") or "https://git.private.coffee" try: TOKEN = os.environ["FORGEJO_TOKEN"]