Update commandManager.py
This commit is contained in:
parent
f1434be12b
commit
215f44f9c2
@ -64,16 +64,7 @@ class commandManager():
|
|||||||
if self.env['runtime']['screenManager'].isSuspendingScreen():
|
if self.env['runtime']['screenManager'].isSuspendingScreen():
|
||||||
return
|
return
|
||||||
#unload
|
#unload
|
||||||
oldScript = ''
|
oldScript = unLoadScript
|
||||||
if isinstance(unLoadScript, list):
|
|
||||||
if len(unLoadScript) == 0:
|
|
||||||
oldScript = 'DEFAULT'
|
|
||||||
else:
|
|
||||||
oldScript = unLoadScript[0]
|
|
||||||
elif unLoadScript:
|
|
||||||
oldScript = str(unLoadScript)
|
|
||||||
if oldScript == '':
|
|
||||||
oldScript == 'DEFAULT'
|
|
||||||
if self.commandExists(oldScript, trigger):
|
if self.commandExists(oldScript, trigger):
|
||||||
try:
|
try:
|
||||||
self.env['commands'][trigger][oldScript].unload()
|
self.env['commands'][trigger][oldScript].unload()
|
||||||
@ -82,16 +73,7 @@ class commandManager():
|
|||||||
self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + oldScript ,debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut("Executing trigger:" + trigger + "." + oldScript ,debug.debugLevel.ERROR)
|
||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
#load
|
#load
|
||||||
newScript = ''
|
newScript = loadScript
|
||||||
if isinstance(loadScript, list):
|
|
||||||
if len(loadScript) == 0:
|
|
||||||
newScript = 'DEFAULT'
|
|
||||||
else:
|
|
||||||
newScript = loadScript[0]
|
|
||||||
elif unLoadScript:
|
|
||||||
newScript = str(loadScript)
|
|
||||||
if newScript == '':
|
|
||||||
newScript == 'DEFAULT'
|
|
||||||
if self.commandExists(newScript, trigger):
|
if self.commandExists(newScript, trigger):
|
||||||
try:
|
try:
|
||||||
self.env['commands'][trigger][newScript].load()
|
self.env['commands'][trigger][newScript].load()
|
||||||
|
Loading…
Reference in New Issue
Block a user