One other note, are you deliberately allowing None (along with other python expressions that are False as booleans) to equate to a 0 return code? You may just want to check for integer type at the beginning of the function, since things compare across type without error (for error-free sorting purposes, ostensibly). E.g.:
{1: 2} > 0 == True "string" > 0 == True Some things will throw TypeErrors for the >0, like sets and complex numbers. -Reid On Thu, Mar 1, 2012 at 5:40 PM, Ethan Jackson <et...@nicira.com> wrote: > > In the final case in ovs_retval_to_string(), I think I'd use %s > > instead of %d: maybe some non-integer value got passed in and my > > instinct is that it's probably better to convert it to a string than > > to throw an exception. > > Sounds good, I've folded the change in. > > Ethan > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev