Ignore not found erros in Paths

Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
Michael Crosby 2014-08-20 10:39:48 -07:00
parent 3cdf12b041
commit a117d3a1c0
1 changed files with 8 additions and 0 deletions

View File

@ -155,13 +155,21 @@ func (raw *data) parent(subsystem string) (string, error) {
func (raw *data) Paths() (map[string]string, error) {
paths := make(map[string]string)
for sysname := range subsystems {
path, err := raw.path(sysname)
if err != nil {
// Don't fail if a cgroup hierarchy was not found, just skip this subsystem
if cgroups.IsNotFound(err) {
continue
}
return nil, err
}
paths[sysname] = path
}
return paths, nil
}