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