Reformat code with pre-commit
This commit is contained in:
@@ -6,13 +6,14 @@ import commands
|
||||
|
||||
from main import CommandMap
|
||||
|
||||
|
||||
def loadCommands(allowDup=False):
|
||||
for filename in listdir("commands"):
|
||||
if filename.endswith(".py") and filename != "__init__.py":
|
||||
commandName = filename[0:-3]
|
||||
className = commandName.capitalize()+"Command"
|
||||
className = commandName.capitalize() + "Command"
|
||||
try:
|
||||
module = __import__('commands.%s' % commandName)
|
||||
module = __import__("commands.%s" % commandName)
|
||||
if not commandName in CommandMap:
|
||||
CommandMap[commandName] = getattr(getattr(module, commandName), className)
|
||||
debug("Registered command: %s" % commandName)
|
||||
|
||||
Reference in New Issue
Block a user