Avoid `None` as a redundant argument to dict.get()

`dict.get()` returns `None` by default, if a key wasn't found.
Removing `None` as second argument to avoid redundancy.

Change-Id: I810854f50257b9dc805248ff1017521cc82d5d73
This commit is contained in:
Raildo Mascena 2016-02-15 13:38:43 -03:00
parent 406fbfaa26
commit d32d9de2aa
3 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ def blank_token_data(issued_at):
class RevokeEvent(object):
def __init__(self, **kwargs):
for k in REVOKE_KEYS:
v = kwargs.get(k, None)
v = kwargs.get(k)
setattr(self, k, v)
if self.domain_id and self.expires_at:

View File

@ -275,7 +275,7 @@ def new_endpoint_ref(service_id, interface='public',
if region_id is NEEDS_REGION_ID:
ref['region_id'] = uuid.uuid4().hex
elif region_id is None and kwargs.get('region', None) is not None:
elif region_id is None and kwargs.get('region') is not None:
# pre-3.2 form endpoints are not supported by this function
raise NotImplementedError("use new_endpoint_ref_with_region")
else:

View File

@ -535,7 +535,7 @@ class FakeLdap(core.LDAPHandler):
self._ldap_options[option] = invalue
def get_option(self, option):
value = self._ldap_options.get(option, None)
value = self._ldap_options.get(option)
return value
def search_ext(self, base, scope,