Skip to content

Commit

Permalink
Updated the text in the exception if no config file is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
CheeseCake87 committed Oct 31, 2023
1 parent d949620 commit b3ebaa4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flask_imp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ def _init_app_config(config_file_path: Path, ignore_missing_env_variables: bool,

def _init_bp_config(blueprint_name: str, config_file_path: Path) -> tuple:
"""
Attempts to load the and process the configuration from_file.
Attempts to load and process the blueprint configuration file.
"""

if not config_file_path.exists():
raise FileNotFoundError(f"{blueprint_name} Blueprint config from_file {config_file_path.name} was not found")
raise FileNotFoundError(f"{blueprint_name} Blueprint config {config_file_path.name} was not found")

config_suffix = ('.toml', '.tml')

if config_file_path.suffix not in config_suffix:
raise TypeError("Config from_file must be one of the following types: .toml / .tml")
raise TypeError("Blueprint Config must be one of the following types: .toml / .tml")

config = process_dict(toml_load(config_file_path), key_case_switch="lower")

Expand Down

0 comments on commit b3ebaa4

Please sign in to comment.