New Year revamp #40

Merged
FrederikBaerentsen merged 31 commits from gregoo/BrickTracker:master into master 2025-01-19 08:19:01 +01:00
Showing only changes of commit 7b682e5859 - Show all commits

View File

@ -23,11 +23,14 @@ class BrickConfigurationList(object):
# Check whether a str configuration is set # Check whether a str configuration is set
@staticmethod @staticmethod
def error_unless_is_set(name: str): def error_unless_is_set(name: str):
value = current_app.config[name].value config: BrickConfiguration = current_app.config[name]
if value is None or value == '': if config.value is None or config.value == '':
raise ConfigurationMissingException( raise ConfigurationMissingException(
'{name} must be defined'.format(name=name), '{name} must be defined (using the {environ} environment variable)'.format( # noqa: E501
name=config.name,
environ=config.env_name
),
) )
# Get all the configuration items from the app config # Get all the configuration items from the app config