Use keyword argument for FeatureDisabled message.

This commit is contained in:
voussoir 2021-10-18 14:12:22 -07:00
parent 6794caa32b
commit 81640102d5
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ def required_feature(features):
pass pass
elif cfg is False: elif cfg is False:
raise exceptions.FeatureDisabled(feature) raise exceptions.FeatureDisabled(requires=feature)
else: else:
raise ValueError(f'Bad required_feature: "{feature}" led to {cfg}.') raise ValueError(f'Bad required_feature: "{feature}" led to {cfg}.')

View file

@ -185,7 +185,7 @@ class FeatureDisabled(EtiquetteException):
''' '''
For when features of the system have been disabled by the configuration. For when features of the system have been disabled by the configuration.
''' '''
error_message = 'This feature has been disabled. Requires {}.' error_message = 'This feature has been disabled. Requires {requires}.'
class NoClosestPhotoDB(EtiquetteException): class NoClosestPhotoDB(EtiquetteException):
''' '''