Merge "Remove functions: _cleanse_dict & format_message"

This commit is contained in:
Jenkins 2015-10-14 22:03:17 +00:00 committed by Gerrit Code Review
commit 95c21de106

View File

@ -45,11 +45,6 @@ CONF = cfg.CONF
CONF.register_opts(exc_log_opts) CONF.register_opts(exc_log_opts)
def _cleanse_dict(original):
"""Strip all admin_password, new_pass, rescue_pass keys from a dict."""
return dict((k, v) for k, v in original.items() if "_pass" not in k)
class IronicException(Exception): class IronicException(Exception):
"""Base Ironic Exception """Base Ironic Exception
@ -115,12 +110,6 @@ class IronicException(Exception):
"""Return a unicode representation of the exception message.""" """Return a unicode representation of the exception message."""
return unicode(self.args[0]) return unicode(self.args[0])
def format_message(self):
if self.__class__.__name__.endswith('_Remote'):
return self.args[0]
else:
return six.text_type(self)
class NotAuthorized(IronicException): class NotAuthorized(IronicException):
_msg_fmt = _("Not authorized.") _msg_fmt = _("Not authorized.")