Reformat project
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user