utils: tuning: Change Tuner.add() to accept a list of modules

Change the first parameter of Tuner.add() to accept either a list of
modules or a single module. This allows more compact code and is in sync
with Tuner.set_output_order().

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Stefan Klug 2024-07-09 16:15:18 +02:00
parent 1dfedac794
commit 53108b6ff1
2 changed files with 5 additions and 10 deletions

View file

@ -95,7 +95,10 @@ class Tuner(object):
self.output = {}
def add(self, module):
self.modules.append(module)
if isinstance(module, list):
self.modules.extend(module)
else:
self.modules.append(module)
def set_input_parser(self, parser):
self.parser = parser