Merge "Remove redundant default value None for dict.get"
This commit is contained in:
commit
7d47acb3cb
@ -503,7 +503,7 @@ class StackController(object):
|
||||
return self._id_format(result)
|
||||
|
||||
con = req.context
|
||||
stack_name = req.params.get('StackName', None)
|
||||
stack_name = req.params.get('StackName')
|
||||
try:
|
||||
identity = stack_name and self._get_identity(con, stack_name)
|
||||
events = self.rpc_client.list_events(con, identity)
|
||||
|
@ -356,7 +356,7 @@ class StackController(object):
|
||||
"""
|
||||
Returns a list of valid resource types that may be used in a template.
|
||||
"""
|
||||
support_status = req.params.get('support_status', None)
|
||||
support_status = req.params.get('support_status')
|
||||
return {
|
||||
'resource_types':
|
||||
self.rpc_client.list_resource_types(req.context, support_status)}
|
||||
|
@ -174,7 +174,7 @@ class SecurityGroup(neutron.NeutronResource):
|
||||
rule[self.RULE_REMOTE_GROUP_ID] = None
|
||||
|
||||
for key in (self.RULE_PORT_RANGE_MIN, self.RULE_PORT_RANGE_MAX):
|
||||
if rule.get(key, None) is not None:
|
||||
if rule.get(key) is not None:
|
||||
rule[key] = str(rule[key])
|
||||
return rule
|
||||
|
||||
|
@ -60,7 +60,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
(method, url, callback))
|
||||
|
||||
# Note the call
|
||||
self.callstack.append((method, url, kwargs.get('body', None)))
|
||||
self.callstack.append((method, url, kwargs.get('body')))
|
||||
|
||||
status, body = getattr(self, callback)(**kwargs)
|
||||
if hasattr(status, 'items'):
|
||||
|
Loading…
Reference in New Issue
Block a user