Reformat legacy project

This commit is contained in:
2022-09-05 07:20:30 +01:00
parent 19ee7071f5
commit a198f2a487
59 changed files with 538 additions and 198 deletions

View File

@@ -13,11 +13,15 @@ def loadCommands(allowDup=False):
# try:
module = __import__("commands.%s" % commandName)
if commandName not in CommandMap:
CommandMap[commandName] = getattr(getattr(module, commandName), className)
CommandMap[commandName] = getattr(
getattr(module, commandName), className
)
debug("Registered command: %s" % commandName)
else:
if allowDup:
CommandMap[commandName] = getattr(getattr(module, commandName), className)
CommandMap[commandName] = getattr(
getattr(module, commandName), className
)
debug("Registered command: %s" % commandName)
error("Duplicate command: %s" % (commandName))