remove redundant code

Now we return not found err in path(), so no need to check again.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2015-03-24 09:19:40 +08:00
parent fd0087d3ac
commit 7766c1e07b
1 changed files with 0 additions and 6 deletions

View File

@ -173,9 +173,6 @@ func (m *Manager) Freeze(state configs.FreezerState) error {
if err != nil {
return err
}
if !cgroups.PathExists(dir) {
return cgroups.NewNotFoundError("freezer")
}
prevState := m.Cgroups.Freezer
m.Cgroups.Freezer = state
@ -200,9 +197,6 @@ func (m *Manager) GetPids() ([]int, error) {
if err != nil {
return nil, err
}
if !cgroups.PathExists(dir) {
return nil, cgroups.NewNotFoundError("devices")
}
return cgroups.ReadProcsFile(dir)
}