bt2: require msg for _OverflowError in _handle_func_status
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 8 Nov 2023 16:21:54 +0000 (16:21 +0000)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 23 Jan 2024 18:44:05 +0000 (13:44 -0500)
commit79092ec57262d4a1131483509d327c77f79eacf0
tree39cb689a1dff6ff9c1a6ac52f791b318f72c9cc5
parent2d6b60ff29423b918ac791f35d4f259178107cc1
bt2: require msg for _OverflowError in _handle_func_status

Pyright says:

    /home/smarchi/src/babeltrace/src/bindings/python/bt2/bt2/utils.py:160:19 - error: Invalid exception class or object
    Constructor for exception type "type[_OverflowError]" requires one or more arguments (reportGeneralTypeIssues)

That's true, _OverflowError has bt2_error._Error as a base, which
requires a message.  Change _handle_func_status to assert that a msg was
provided when handling that case.

Change-Id: I961c336cf53ce13e5f4241728e1131cccb77efcf
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11297
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/bindings/python/bt2/bt2/utils.py
This page took 0.026245 seconds and 4 git commands to generate.