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 <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches