Nir Soffer has posted comments on this change.

Change subject: rpc: Log also error codes of RPC calls
......................................................................


Patch Set 10:

(1 comment)

https://gerrit.ovirt.org/#/c/59234/10/lib/vdsm/rpc/bindingxmlrpc.py
File lib/vdsm/rpc/bindingxmlrpc.py:

Line 1273:             if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
Line 1274:                 res = errCode['noVM']
Line 1275:             else:
Line 1276:                 res = errCode['unexpected']
Line 1277:             return res
> why to return 3 times? We have res in scope of the wrapper so we can return
Not sure that it is better, I like early return and smaller scope for 
variables, but here it seems that we need res anyway.

We are going to delete this code soon, so better minimize the changes.
Line 1278:         except VdsmException as e:
Line 1279:             f.__self__.cif.log.error("vdsm exception occured", 
exc_info=True)
Line 1280:             res = e.response()
Line 1281:             return res


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I776e667fcfd1a20a9ef5f6c638d6c3d950672314
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzama...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Milan Zamazal <mzama...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to