diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-07-09 16:15:18 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-08-14 16:22:07 +0200 |
commit | 53108b6ff1c5ea93bee9f8c5329c840e24f24a8d (patch) | |
tree | 57da0124752967b760e5f2513f7d8eece66abf66 /utils/tuning/libtuning/libtuning.py | |
parent | 1dfedac794f2f26d2ee99b4d7316a84757ee643b (diff) |
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>
Diffstat (limited to 'utils/tuning/libtuning/libtuning.py')
-rw-r--r-- | utils/tuning/libtuning/libtuning.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/tuning/libtuning/libtuning.py b/utils/tuning/libtuning/libtuning.py index e7c63535..bac57323 100644 --- a/utils/tuning/libtuning/libtuning.py +++ b/utils/tuning/libtuning/libtuning.py @@ -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 |