def get_async_result_paths_chilren_per_host(children):
"""
Combines arguments, with returned lists to get a unique sequence of
full qualified Zookeeper paths, for all the children of the directories
queried.
Returns a simple sorted list of unique paths returned by ``get_async_call_per_host``
when the call performed is ``get_children()``
:param children: A structure as returned from ``get_async_call_per_host()``
"""
paths = set()
for parent_path, host_children in six.viewitems(children):
for client_idx, child_paths in six.viewitems(host_children):
if isinstance(child_paths, Exception):
continue
for child_path in child_paths:
paths.add(znode_path_join([parent_path, child_path]))
return sorted(paths)
评论列表
文章目录