[PATCH] utils: codegen: controls.py: Fix missing direction error message
Paul Elder
paul.elder at ideasonboard.com
Wed Jan 8 23:29:50 CET 2025
The error message for missing direction field prints the direction value
(usually 'None') instead of the name of the field 'direction'. Fix this.
Fixes: 39fe4ad96803 ("utils: codegen: controls.py: Parse direction information")
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
utils/codegen/controls.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/codegen/controls.py b/utils/codegen/controls.py
index 602f15b25..e51610481 100644
--- a/utils/codegen/controls.py
+++ b/utils/codegen/controls.py
@@ -65,7 +65,7 @@ class Control(object):
else:
direction = self.__data.get('direction')
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']:
raise RuntimeError(f'Control `{self.__name}` direction `{direction}` is invalid; must be one of `in`, `out`, or `inout`')
self.__direction = direction
--
2.39.2
More information about the libcamera-devel
mailing list