From Dan Kenigsberg <dan...@redhat.com>:

Dan Kenigsberg has submitted this change and it was merged.

Change subject: monitor: Fix pylint error when invoking callabck
......................................................................


monitor: Fix pylint error when invoking callabck

Pylint was complaining about non-callable cycleCallback. The callback
was initialized to None, and the code was checking if cycleCallback is
not None before invoking it, but pylint is not smart to enough to
understand this.

Fixed by initializing to _NULL_CALLBACK function. Now we don't need the
None check and we can invoke the callback on every iteration. This is a
little bit more expensive compared with the None check, but we call this
once in 10 seconds so it does not matter.

Change-Id: I8f7ac8e842d415b7fe457875529abcae35ddcaec
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M vdsm/storage/monitor.py
1 file changed, 7 insertions(+), 5 deletions(-)

Approvals:
  Nir Soffer: Verified
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/75736
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f7ac8e842d415b7fe457875529abcae35ddcaec
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to