Who let the bytecode out of the bag >:(
This commit is contained in:
parent
1a9001e956
commit
f0f49cce18
1 changed files with 2 additions and 0 deletions
|
@ -185,10 +185,12 @@ class Plugin:
|
|||
|
||||
@staticmethod
|
||||
def external(path, logger=None, config=dict(), flags=dict()):
|
||||
sys.dont_write_bytecode = True
|
||||
module_spec = importlib.util.spec_from_file_location(
|
||||
path.stem,
|
||||
path.as_posix(),
|
||||
)
|
||||
module = importlib.util.module_from_spec(module_spec)
|
||||
module_spec.loader.exec_module(module)
|
||||
sys.dont_write_bytecode = False
|
||||
return Plugin(path.stem, module, logger, config.get(path.stem, dict()), flags.get(path.stem, dict()))
|
||||
|
|
Loading…
Reference in a new issue