Raise NotImplementedError instead of NotImplemented
NotImplementedError is the name of the exception (https://docs.python.org/2/library/exceptions.html). NotImplemented is the name of a constant (https://docs.python.org/2/library/constants.html). This patch fix it. Change-Id: Icfbc0603d03e2001d1494027c492059687e15fa7 Closes-Bug: #1339855
This commit is contained in:
parent
814298a477
commit
2d3e376a2c
@ -227,7 +227,7 @@ class _FederatedSaml(v3.FederationBaseAuth):
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_requests_auth(self):
|
||||
raise NotImplemented()
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_unscoped_auth_ref(self, session, **kwargs):
|
||||
method = self.get_requests_auth()
|
||||
|
@ -194,7 +194,7 @@ class Auth(BaseAuth):
|
||||
for method in self.auth_methods:
|
||||
try:
|
||||
elements = method.get_cache_id_elements()
|
||||
except NotImplemented:
|
||||
except NotImplementedError:
|
||||
return None
|
||||
|
||||
params.update(elements)
|
||||
@ -259,7 +259,7 @@ class AuthMethod(object):
|
||||
should be prefixed with the plugin identifier. For example the password
|
||||
plugin returns its username value as 'password_username'.
|
||||
"""
|
||||
raise NotImplemented()
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
|
@ -280,7 +280,7 @@ class _OidcBase(federation.FederationBaseAuth):
|
||||
:returns: a python dictionary containing the payload to be exchanged
|
||||
:rtype: dict
|
||||
"""
|
||||
raise NotImplemented()
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class OidcPassword(_OidcBase):
|
||||
|
@ -104,7 +104,7 @@ class BaseLoader(object):
|
||||
|
||||
@property
|
||||
def plugin_class(self):
|
||||
raise NotImplemented()
|
||||
raise NotImplementedError()
|
||||
|
||||
def create_plugin(self, **kwargs):
|
||||
"""Create a plugin from the options available for the loader.
|
||||
|
Loading…
Reference in New Issue
Block a user