def iter_roots(roots):
 for (saltenv, dirs) in six.iteritems(roots):
  for dir_ in dirs:
   if (not os.path.isdir(dir_)):
    continue
   for ret in _iter_dir(dir_, saltenv):
    (yield ret)

def iter_roots ( roots ) : for ( saltenv , dirs ) in six . iteritems ( roots ) : for dir_ in dirs : if ( not os . path . isdir ( dir_ ) ) : continue for ret in _iter_dir ( dir_ , saltenv ) : ( yield ret )
accepts the file_roots or the pillar_roots structures and yields {path: <path> .