From 9a68f4d12583b413add200ec86a415bf2a2f0704 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 12 Oct 2015 18:10:28 -0400 Subject: [PATCH] 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 --- tempest_lib/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tempest_lib/auth.py b/tempest_lib/auth.py index 1d23d31..0a05445 100644 --- a/tempest_lib/auth.py +++ b/tempest_lib/auth.py @@ -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)