[elbe-devel] [PATCH 01/10] elbepack: finetuning: simplify action registration

Thomas Weißschuh thomas.weissschuh at linutronix.de
Mon Aug 12 14:19:22 CEST 2024


ImageFinetuningAction is only a baseclass for other actions.
It does not need to be registered.
Remove its registration and the custom registration code which is now
unused.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/finetuning.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index 070a4e3b3afa..31cb868401e6 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -35,11 +35,10 @@ class FinetuningAction:
     tag = None
 
     @classmethod
-    def register(cls, tag, register=True):
+    def register(cls, tag):
         def _register(action):
             action.tag = tag
-            if register is True:
-                cls.actiondict[tag] = action
+            cls.actiondict[tag] = action
             return action
         return _register
 
@@ -59,7 +58,6 @@ class FinetuningAction:
         self.execute(buildenv, target)
 
 
- at FinetuningAction.register('image_finetuning', False)
 class ImageFinetuningAction(FinetuningAction):
 
     def execute(self, _buildenv, _target):

-- 
2.46.0



More information about the elbe-devel mailing list