From a26b7291d1a522c4abf29ccd0f72b152159e7b23 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Tue, 5 Jan 2021 19:42:34 +0100 Subject: [PATCH] meta: add module path to module info Add the path to the executable for that module to the ModuleInfo. This can then later be used to actually execute said module. The information is already readily available since we used the path to load the information from the file in the first place. --- osbuild/meta.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osbuild/meta.py b/osbuild/meta.py index 691337b3..c1843aa0 100644 --- a/osbuild/meta.py +++ b/osbuild/meta.py @@ -273,9 +273,10 @@ class ModuleInfo: Normally this class is instantiated via its `load` method. """ - def __init__(self, klass: str, name: str, info: str): + def __init__(self, klass: str, name: str, path: str, info: str): self.name = name self.type = klass + self.path = path opts = info.get("schema") or "" self.info = info.get("info") @@ -353,7 +354,7 @@ class ModuleInfo: 'desc': doclist[0], 'info': "\n".join(doclist[1:]) } - return cls(klass, name, info) + return cls(klass, name, path, info) @staticmethod def module_class_to_directory(klass: str) -> str: