Change in vdsm[master]: Refactoring reportError func

kobi at redhat.com kobi at redhat.com
Tue Jun 10 10:57:51 UTC 2014


Kobi Ianko has posted comments on this change.

Change subject: Refactoring reportError func
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/28482/5/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4497:         This method should be called in cases of exception.
Line 4498:         """
Line 4499:         self.log.exception("Operation failed")
Line 4500:         if msg is None:
Line 4501:             error = errCode[key]
> By "explode" I mean "raise an unexpected KeyError". That try out running
Ok, got it.
Now, would you suggest I'll create a generic Err (maybe call it VmErr?) or pick one (maybe 'unavail')? now that the function is in the class level
Line 4502:         else:
Line 4503:             error = {'status': {'code': errCode[key]
Line 4504:                                 ['status']['code'], 'message': msg}}
Line 4505:         return error


-- 
To view, visit http://gerrit.ovirt.org/28482
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I041a662f4fe02f671a7335d7eca84704443f5bee
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Kobi Ianko <kobi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list