Merge "Add exception message to invalid cred field"
This commit is contained in:
@@ -528,7 +528,8 @@ class Credentials(object):
|
|||||||
if key in self.ATTRIBUTES:
|
if key in self.ATTRIBUTES:
|
||||||
setattr(self, key, attr[key])
|
setattr(self, key, attr[key])
|
||||||
else:
|
else:
|
||||||
raise exceptions.InvalidCredentials
|
msg = '%s is not a valid attr for %s' % (key, self.__class__)
|
||||||
|
raise exceptions.InvalidCredentials(msg)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
"""Represent only attributes included in self.ATTRIBUTES"""
|
"""Represent only attributes included in self.ATTRIBUTES"""
|
||||||
|
Reference in New Issue
Block a user