fix(modules): return and compare lowercase modules names, since case should not matter

main
Marshall Hallenbeck 2023-03-23 13:52:36 -04:00
parent e7fcea0851
commit 84e239c139
2 changed files with 6 additions and 3 deletions

View File

@ -254,7 +254,7 @@ def main():
sys.exit(0)
elif args.module:
logging.debug(f"Modules to be Loaded: {args.module}, {type(args.module)}")
for m in args.module:
for m in map(str.lower, args.module):
if m not in modules:
logger.error(f"Module not found: {m}")
exit(1)

View File

@ -76,8 +76,11 @@ class module_loader:
module_path = os.path.join(path, module)
m = self.load_module(os.path.join(path, module))
if m and (self.args.protocol in m.supported_protocols):
modules[m.name] = {'path': os.path.join(path, module), 'description': m.description, 'options': m.options.__doc__}#'chain_support': m.chain_support}
modules[m.name.lower()] = {
'path': os.path.join(path, module),
'description': m.description,
'options': m.options.__doc__
} # 'chain_support': m.chain_support}
return modules
def init_module(self, module_path):