Reformat code with pre-commit
This commit is contained in:
@@ -8,16 +8,17 @@ import commands
|
||||
|
||||
from main import CommandMap
|
||||
|
||||
|
||||
def loadSingle(commandName):
|
||||
if commandName+".py" in listdir("commands"):
|
||||
className = commandName.capitalize()+"Command"
|
||||
if commandName + ".py" in listdir("commands"):
|
||||
className = commandName.capitalize() + "Command"
|
||||
try:
|
||||
if commandName in CommandMap.keys():
|
||||
reload(sys.modules["commands."+commandName])
|
||||
CommandMap[commandName] = getattr(sys.modules["commands."+commandName], className)
|
||||
reload(sys.modules["commands." + commandName])
|
||||
CommandMap[commandName] = getattr(sys.modules["commands." + commandName], className)
|
||||
debug("Reloaded command: %s" % commandName)
|
||||
return "RELOAD"
|
||||
module = __import__('commands.%s' % commandName)
|
||||
module = __import__("commands.%s" % commandName)
|
||||
CommandMap[commandName] = getattr(getattr(module, commandName), className)
|
||||
debug("Registered command: %s" % commandName)
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user