mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	core/agenda.py: Add check for empty values in agenda
This gives an error message when an agenda contains a key with no value, so creating agendas is a little more user-friendly.
This commit is contained in:
		| @@ -173,6 +173,9 @@ class Agenda(object): | |||||||
|             message = '{} does not contain a valid agenda structure; top level must be a dict.' |             message = '{} does not contain a valid agenda structure; top level must be a dict.' | ||||||
|             raise ConfigError(message.format(self.filepath)) |             raise ConfigError(message.format(self.filepath)) | ||||||
|         for k, v in raw.iteritems(): |         for k, v in raw.iteritems(): | ||||||
|  |             if v is None: | ||||||
|  |                 raise ConfigError('Empty "{}" entry in {}'.format(k, self.filepath)) | ||||||
|  |  | ||||||
|             if k == 'config': |             if k == 'config': | ||||||
|                 if not isinstance(v, dict): |                 if not isinstance(v, dict): | ||||||
|                     raise ConfigError('Invalid agenda: "config" entry must be a dict') |                     raise ConfigError('Invalid agenda: "config" entry must be a dict') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user