Reformat project

This commit is contained in:
2022-07-21 13:40:05 +01:00
parent 4ecb37b179
commit 2fecd98978
44 changed files with 363 additions and 236 deletions

View File

@@ -1,8 +1,7 @@
from os import listdir
from utils.logging.debug import debug
from utils.logging.log import *
import commands
from utils.logging.log import error
from main import CommandMap
@@ -14,7 +13,7 @@ def loadCommands(allowDup=False):
className = commandName.capitalize() + "Command"
# try:
module = __import__("commands.%s" % commandName)
if not commandName in CommandMap:
if commandName not in CommandMap:
CommandMap[commandName] = getattr(getattr(module, commandName), className)
debug("Registered command: %s" % commandName)
else:

View File

@@ -3,8 +3,6 @@ from importlib import reload
import sys
from utils.logging.debug import debug
from utils.logging.log import *
import commands
from main import CommandMap