Revert "Add class to run a single module"
This reverts commit 0b341f411fb508494b8a449b38c5254a3c0caefa.
This commit is contained in:
parent
5cae85fa0b
commit
ef16367a12
@ -1,18 +0,0 @@
|
|||||||
import os
|
|
||||||
import importlib
|
|
||||||
|
|
||||||
|
|
||||||
def run_module(name):
|
|
||||||
for folder in os.listdir("./modules"):
|
|
||||||
if folder == name:
|
|
||||||
print("Module found: " + folder)
|
|
||||||
curr_module = importlib.import_module('.' + folder, package="modules")
|
|
||||||
print("Try to load module: " + folder)
|
|
||||||
instance = curr_module.get_module()
|
|
||||||
print("Module loaded successfully: " + folder)
|
|
||||||
instance.get_command()
|
|
||||||
return
|
|
||||||
raise FileNotFoundError("The specified module was not found.")
|
|
||||||
|
|
||||||
|
|
||||||
run_module(input("Please specify module: "))
|
|
Loading…
Reference in New Issue
Block a user