utils: codegen: controls.py: Fix missing direction error message
The error message for missing direction field prints the direction value
(usually 'None') instead of the name of the field 'direction'. Fix this.
Fixes: 39fe4ad968
("utils: codegen: controls.py: Parse direction information")
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
de44514b25
commit
8d50577c0f
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class Control(object):
|
||||||
else:
|
else:
|
||||||
direction = self.__data.get('direction')
|
direction = self.__data.get('direction')
|
||||||
if direction is None:
|
if direction is None:
|
||||||
raise RuntimeError(f'Control `{self.__name}` missing required field `{direction}`')
|
raise RuntimeError(f'Control `{self.__name}` missing required field `direction`')
|
||||||
if direction not in ['in', 'out', 'inout']:
|
if direction not in ['in', 'out', 'inout']:
|
||||||
raise RuntimeError(f'Control `{self.__name}` direction `{direction}` is invalid; must be one of `in`, `out`, or `inout`')
|
raise RuntimeError(f'Control `{self.__name}` direction `{direction}` is invalid; must be one of `in`, `out`, or `inout`')
|
||||||
self.__direction = direction
|
self.__direction = direction
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue