Merge "Optimise the function.dep_attrs() function"

This commit is contained in:
Jenkins 2017-07-26 20:34:05 +00:00 committed by Gerrit Code Review
commit a4bc6e1dd6

View File

@ -289,7 +289,7 @@ def dep_attrs(snippet, resource_name):
return snippet.dep_attrs(resource_name)
elif isinstance(snippet, collections.Mapping):
attrs = (dep_attrs(value, resource_name) for value in snippet.items())
attrs = (dep_attrs(val, resource_name) for val in snippet.values())
return itertools.chain.from_iterable(attrs)
elif (not isinstance(snippet, six.string_types) and
isinstance(snippet, collections.Iterable)):