Nir Soffer has posted comments on this change. Change subject: virt: common handling of exceptions ......................................................................
Patch Set 7: (1 comment) https://gerrit.ovirt.org/#/c/54664/7/lib/vdsm/virt/api.py File lib/vdsm/virt/api.py: Line 45: Line 46: _log.debug("FINISH %s response=%s", func.__name__, ret) Line 47: Line 48: if isinstance(ret, dict): Line 49: return response.success(**ret) > maybe add a debug log to document that the return value is discarded? I just noticed this, we should not do this. We should have a clear and strict api: - if there is not return value, return None (e.g. no return in python) - If there is a return value it must be a dict The code should be: if ret is None: return response.success() else: return response.success(**ret) Hopefully this works with current vdsm verbs. Line 50: return response.success() Line 51: -- To view, visit https://gerrit.ovirt.org/54664 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic186dc8fa062d8b3789c6057bba68fbbc23f311b Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches