Skip to content

Commit

Permalink
make ENCRYPTION_KEY not a required env var at parse time
Browse files Browse the repository at this point in the history
  • Loading branch information
brassy-endomorph committed Oct 17, 2024
1 parent 71140c3 commit 61b0f76
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hushline/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ def _load_smtp(env: Mapping[str, str]) -> Mapping[str, Any]:


def _load_hushline_misc(env: Mapping[str, str]) -> Mapping[str, Any]:
data: dict[str, Any] = {
"ENCRYPTION_KEY": env["ENCRYPTION_KEY"],
}
data: dict[str, Any] = {}

# this is required by the Flask app but not by the Stripe worker
# so we have to allow for it to be missing
if key := env.get("ENCRYPTION_KEY"):
data["ENCRYPTION_KEY"] = key

if onion := env.get("ONION_HOSTNAME"):
data["ONION_HOSTNAME"] = onion
Expand Down

0 comments on commit 61b0f76

Please sign in to comment.