Skip to content

Commit

Permalink
Fix loading statusfile error checking (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-at-redhat authored Oct 29, 2024
1 parent c38b640 commit b89bdac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/workceptor/workceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ func (w *Workceptor) scanForUnit(unitID string) {
if !ok {
statusFilename := path.Join(unitdir, "status")
sfd := &StatusFileData{}
_ = sfd.Load(statusFilename)
serr := sfd.Load(statusFilename)
if serr != nil {
w.nc.GetLogger().Error("Error loading %s: %s", statusFilename, serr)
}
w.workTypesLock.RLock()
wt, ok := w.workTypes[sfd.WorkType]
w.workTypesLock.RUnlock()
Expand Down

0 comments on commit b89bdac

Please sign in to comment.