Log kwargs on a failed String Format Operation
fixes bug 971552 If the string format operation in NovaException raises an exception be sure to log the kwargs at log level error Change-Id: Idfc54b8c05256bd7c849c86dc45f0b493727fe58
This commit is contained in:
		@@ -168,6 +168,11 @@ class NovaException(Exception):
 | 
			
		||||
                message = self.message % kwargs
 | 
			
		||||
 | 
			
		||||
            except Exception as e:
 | 
			
		||||
                # kwargs doesn't match a variable in the message
 | 
			
		||||
                # log the issue and the kwargs
 | 
			
		||||
                LOG.exception(_('Exception in string format operation'))
 | 
			
		||||
                for name, value in kwargs.iteritems():
 | 
			
		||||
                    LOG.error("%s: %s" % (name, value))
 | 
			
		||||
                # at least get the core message out if something happened
 | 
			
		||||
                message = self.message
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user