Update the class name in the single command loader and import the debug function which it uses

This commit is contained in:
Mark Veidemanis 2019-08-25 23:12:51 +01:00
parent 2d70d5af11
commit 006f8db6f6
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ from os import listdir
from importlib import reload
from sys import modules
from utils.logging.debug import debug
from utils.logging.log import *
import commands
@ -9,7 +10,7 @@ from main import CommandMap
def loadSingle(commandName):
if commandName+".py" in listdir("commands"):
className = commandName.capitalize()
className = commandName.capitalize()+"Command"
try:
if commandName in CommandMap.keys():
reload(modules["commands."+commandName])