Use keyword argument for FeatureDisabled message.
This commit is contained in:
		
							parent
							
								
									6794caa32b
								
							
						
					
					
						commit
						81640102d5
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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}.') | ||||||
|  |  | ||||||
|  | @ -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): | ||||||
|     ''' |     ''' | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue