mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 00:52:08 +00:00 
			
		
		
		
	ResourceResolver: Show version number when resource wasn't found.
If the ResourceResolver was looking for a specific version of a resource and could not find it, this version number is now shown in the error message.
This commit is contained in:
		@@ -69,7 +69,11 @@ class ResourceResolver(object):
 | 
			
		||||
                self.logger.debug('\t{}'.format(result))
 | 
			
		||||
                return result
 | 
			
		||||
        if strict:
 | 
			
		||||
            raise ResourceError('{} could not be found'.format(resource))
 | 
			
		||||
            if kwargs:
 | 
			
		||||
                criteria = ', '.join(['{}:{}'.format(k, v) for k, v in kwargs.iteritems()])
 | 
			
		||||
                raise ResourceError('{} ({}) could not be found'.format(resource, criteria))
 | 
			
		||||
            else:
 | 
			
		||||
                raise ResourceError('{} could not be found'.format(resource))
 | 
			
		||||
        self.logger.debug('Resource {} not found.'.format(resource))
 | 
			
		||||
        return None
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user