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.
This commit is contained in:
parent
a0e862f083
commit
a26b7291d1
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue