pruner: report: fix broken checks for state (wrong precedence rules)

This commit is contained in:
Christian Schwarz 2018-10-21 13:37:08 +02:00
parent 190c7270d9
commit 5ec7a5c078

View File

@ -239,10 +239,10 @@ func (p *Pruner) Report() *Report {
r := Report{State: p.state.String()}
if p.state & PlanWait|ExecWait != 0 {
if p.state & (PlanWait|ExecWait) != 0 {
r.SleepUntil = p.sleepUntil
}
if p.state & PlanWait|ExecWait|ErrPerm != 0 {
if p.state & (PlanWait|ExecWait|ErrPerm) != 0 {
if p.err != nil {
r.Error = p.err.Error()
}