Correction of a problem with wheel package.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
from configparser import ConfigParser
|
||||
import logging
|
||||
@@ -204,6 +205,7 @@ class CommandsLoader:
|
||||
def __init__(self, config: ConfigParser, log: logging.Handler, modpath: str):
|
||||
self.config = config
|
||||
self.modpath = modpath
|
||||
sys.path.append(os.path.join(modpath))
|
||||
Commands.defmod = self.config["general"].get("default")
|
||||
precmd = self.config["general"].get("methods_prefix")
|
||||
if not precmd is None:
|
||||
@@ -242,7 +244,11 @@ class CommandsLoader:
|
||||
self.cmods = cmds
|
||||
|
||||
def _load_module(self, name: str):
|
||||
module = import_module(name)
|
||||
try:
|
||||
module = import_module(name)
|
||||
except ModuleNotFoundError:
|
||||
raise Exception(f"""The module "{name}" could not be loaded.""")
|
||||
|
||||
members = inspect.getmembers(module, inspect.isclass)
|
||||
conf = None
|
||||
if name[len(self.precmds):] in self.config.sections():
|
||||
|
||||
Reference in New Issue
Block a user