Merge "Correct higgins reraising of exception"

This commit is contained in:
Jenkins 2016-09-11 17:15:37 +00:00 committed by Gerrit Code Review
commit 47f3581d2b

View File

@ -192,17 +192,17 @@ class ZunException(Exception):
try:
self.message = self.message % kwargs
except Exception as e:
except KeyError:
# kwargs doesn't match a variable in the message
# log the issue and the kwargs
LOG.exception(_LE('Exception in string format operation, '
'kwargs: %s') % kwargs)
try:
if CONF.fatal_exception_format_errors:
raise e
ferr = CONF.fatal_exception_format_errors
except cfg.NoSuchOptError:
if CONF.oslo_versionedobjects.fatal_exception_format_errors:
raise e
ferr = CONF.oslo_versionedobjects.fatal_exception_format_errors
if ferr:
raise
super(ZunException, self).__init__(self.message)