Skip to content

Commit

Permalink
Raise if no settings have been provided
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWinterstein committed Nov 26, 2024
1 parent 95ec04f commit 7787ee8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions toogoodtogo_ha_mqtt_bridge/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
settings_files=["settings.json", "settings.local.json", ".secrets.toml"],
)

if not settings.get("tgtg"):
msg = "No valid local settigs file found, check README.md for more info"
raise Exception(msg) # noqa: TRY002

# `envvar_prefix` = export envvars with `export DYNACONF_FOO=bar`.
# `settings_files` = Load this files in the order.

0 comments on commit 7787ee8

Please sign in to comment.