Merge "Remove functions: _cleanse_dict & format_message"
This commit is contained in:
commit
95c21de106
@ -45,11 +45,6 @@ CONF = cfg.CONF
|
||||
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):
|
||||
"""Base Ironic Exception
|
||||
|
||||
@ -115,12 +110,6 @@ class IronicException(Exception):
|
||||
"""Return a unicode representation of the exception message."""
|
||||
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):
|
||||
_msg_fmt = _("Not authorized.")
|
||||
|
Loading…
Reference in New Issue
Block a user