[node-patches] Change in ovirt-node[master]: New validation model should invalidate on custom plugin vali...
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Mon Oct 7 09:41:17 UTC 2013
Fabian Deutsch has posted comments on this change.
Change subject: New validation model should invalidate on custom plugin validation
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
Good catch. Just a nit pick
....................................................
File src/ovirt/node/plugins.py
Line 298: # If caught here, it's from custom validation, and we
Line 299: # don't know for sure what failed, so flag everything
Line 300: self.__invalid_changes.update(dict((k, v) for (k, v) in
Line 301: change.iteritems()))
Line 302: raise e
Good catch. Please use:
except exceptions.InvalidData:
...
raise
So no explicitly catching and passing the exception (e). This leads to a nicer stacktrace. IIRC if you do `raise e` the stack trace will only point to this line wher eit was raised, but not to the original line where e came from.
Line 303:
Line 304: self.__changes.update(change)
Line 305:
Line 306: except exceptions.InvalidData as e:
--
To view, visit http://gerrit.ovirt.org/19880
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2b1943481af377ce629593725de03c9f6d58868
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the node-patches
mailing list