Set a default value for default param

This commit sets a default value for the default param in the get()
method for the Credential class. The fact that you have to set a
default breaks the assumption on a get() method where it'll default
None if there is no entry for the input parameter. This commit fixes
this by defaulting the default param to be None.

Change-Id: I4015106b76f2762d0caaf73b1525c27197f803f1
This commit is contained in:
Matthew Treinish
2015-10-12 18:10:28 -04:00
parent a23ffbaa5b
commit 9a68f4d125

View File

@@ -556,7 +556,7 @@ class Credentials(object):
else:
raise AttributeError
def get(self, item, default):
def get(self, item, default=None):
# In this patch act as dict for backward compatibility
try:
return getattr(self, item)