Merge "Avoid Forcing the Translation of Translatable Variables"
This commit is contained in:
@@ -607,10 +607,10 @@ class ResourceExceptionHandler(object):
|
||||
ex_value, exc_info=exc_info)
|
||||
raise Fault(webob.exc.HTTPBadRequest())
|
||||
elif isinstance(ex_value, Fault):
|
||||
LOG.info(_LI("Fault thrown: %s"), six.text_type(ex_value))
|
||||
LOG.info(_LI("Fault thrown: %s"), ex_value)
|
||||
raise ex_value
|
||||
elif isinstance(ex_value, webob.exc.HTTPException):
|
||||
LOG.info(_LI("HTTP exception thrown: %s"), six.text_type(ex_value))
|
||||
LOG.info(_LI("HTTP exception thrown: %s"), ex_value)
|
||||
raise Fault(ex_value)
|
||||
|
||||
# We didn't handle the exception
|
||||
|
||||
@@ -47,10 +47,10 @@ class EvalConstant(object):
|
||||
result = _vars[which_dict][entry]
|
||||
except KeyError as e:
|
||||
raise exception.EvaluatorParseException(
|
||||
_("KeyError: %s") % six.text_type(e))
|
||||
_("KeyError: %s") % e)
|
||||
except TypeError as e:
|
||||
raise exception.EvaluatorParseException(
|
||||
_("TypeError: %s") % six.text_type(e))
|
||||
_("TypeError: %s") % e)
|
||||
|
||||
try:
|
||||
result = int(result)
|
||||
@@ -59,7 +59,7 @@ class EvalConstant(object):
|
||||
result = float(result)
|
||||
except ValueError as e:
|
||||
raise exception.EvaluatorParseException(
|
||||
_("ValueError: %s") % six.text_type(e))
|
||||
_("ValueError: %s") % e)
|
||||
|
||||
return result
|
||||
|
||||
@@ -105,7 +105,7 @@ class EvalMultOp(object):
|
||||
prod /= float(val.eval())
|
||||
except ZeroDivisionError as e:
|
||||
raise exception.EvaluatorParseException(
|
||||
_("ZeroDivisionError: %s") % six.text_type(e))
|
||||
_("ZeroDivisionError: %s") % e)
|
||||
return prod
|
||||
|
||||
|
||||
@@ -292,6 +292,6 @@ def evaluate(expression, **kwargs):
|
||||
result = _parser.parseString(expression, parseAll=True)[0]
|
||||
except pyparsing.ParseException as e:
|
||||
raise exception.EvaluatorParseException(
|
||||
_("ParseException: %s") % six.text_type(e))
|
||||
_("ParseException: %s") % e)
|
||||
|
||||
return result.eval()
|
||||
|
||||
@@ -1692,7 +1692,7 @@ class EMCVMAXUtils(object):
|
||||
instance = None
|
||||
else:
|
||||
# Something else that we cannot recover from has happened.
|
||||
LOG.error(_LE("Exception: %s"), six.text_type(desc))
|
||||
LOG.error(_LE("Exception: %s"), desc)
|
||||
exceptionMessage = (_(
|
||||
"Cannot verify the existence of object:"
|
||||
"%(instanceName)s.")
|
||||
|
||||
Reference in New Issue
Block a user