Merge "Correct watcher reraising of exception"

This commit is contained in:
Jenkins
2016-08-26 14:16:45 +00:00
committed by Gerrit Code Review

View File

@@ -86,7 +86,7 @@ class WatcherException(Exception):
if not message: if not message:
try: try:
message = self.msg_fmt % kwargs message = self.msg_fmt % kwargs
except Exception as e: except Exception:
# kwargs doesn't match a variable in msg_fmt # kwargs doesn't match a variable in msg_fmt
# log the issue and the kwargs # log the issue and the kwargs
LOG.exception(_LE('Exception in string format operation')) LOG.exception(_LE('Exception in string format operation'))
@@ -95,7 +95,7 @@ class WatcherException(Exception):
{'name': name, 'value': value}) {'name': name, 'value': value})
if CONF.fatal_exception_format_errors: if CONF.fatal_exception_format_errors:
raise e raise
else: else:
# at least get the core msg_fmt out if something happened # at least get the core msg_fmt out if something happened
message = self.msg_fmt message = self.msg_fmt