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:
parent
fd0087d3ac
commit
7766c1e07b
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue