Ondřej Svoboda has posted comments on this change.
Change subject: netinfo: Replace misused asserts with InvalidConfiguration ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
Good catch! :-) I have a note how to improve your nice messages even more.
http://gerrit.ovirt.org/#/c/34361/1/lib/vdsm/netinfo.py File lib/vdsm/netinfo.py:
Line 859: for port in ports: Line 860: if port in self.vlans: Line 861: if vlan is not None: Line 862: raise InvalidConfiguration( Line 863: "Unexpected vlan: %s exepected: None" % (vlan,)) I recommend a comma to separate values visually :-)
"Unexpected vlan: %s, expected: None" % vlan) Line 864: nic = getVlanDevice(port) Line 865: vlan = getVlanID(port) Line 866: if self.vlans[port]['iface'] != nic: Line 867: raise InvalidConfiguration(