Merge "Replace while with if in resolve function"
This commit is contained in:
commit
6bd01b350e
|
@ -127,8 +127,8 @@ class Function(object):
|
|||
|
||||
|
||||
def resolve(snippet):
|
||||
while isinstance(snippet, Function):
|
||||
snippet = snippet.result()
|
||||
if isinstance(snippet, Function):
|
||||
return snippet.result()
|
||||
|
||||
if isinstance(snippet, collections.Mapping):
|
||||
return dict((k, resolve(v)) for k, v in snippet.items())
|
||||
|
|
|
@ -464,9 +464,9 @@ class ResourceGroup(stack_resource.StackResource):
|
|||
# assigned. Pass in a custom resolver to the properties to not
|
||||
# error when a parameter does not have a user entered value.
|
||||
def ignore_param_resolve(snippet):
|
||||
while isinstance(snippet, function.Function):
|
||||
if isinstance(snippet, function.Function):
|
||||
try:
|
||||
snippet = snippet.result()
|
||||
return snippet.result()
|
||||
except exception.UserParameterMissing:
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue