bt2: field.py: _value_to_int(): require `numbers.Integral`
Be more strict in the _value_to_int() functions: require that the
parameter's type is an instance of `numbers.Integral` instead of
`numbers.Real` to make the following raise a type error:
my_int_field.value = 17.5
I believe it's better to be strict here than to arbitrarily choose to
use the parameter's value's floor.
RealValue._value_to_float() already requires a real value, so this is
just analogous.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I3b981e90f7e2c133fa4d56e79333c4fe600eca8b
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1569
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.025036 seconds and 4 git commands to generate.