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.
This commit is contained in:
parent
3d13ae755a
commit
623115295a
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import logging
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
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:
|
try:
|
||||||
TOKEN = os.environ["FORGEJO_TOKEN"]
|
TOKEN = os.environ["FORGEJO_TOKEN"]
|
||||||
|
|
Loading…
Reference in a new issue