fix unfefined variable
This commit is contained in:
parent
f32de79204
commit
9030e4801a
@ -116,19 +116,20 @@ class commandManager():
|
|||||||
shortcut = []
|
shortcut = []
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if not self.env['runtime']['inputManager'].isValidKey(key.upper()):
|
if not self.env['runtime']['inputManager'].isValidKey(key.upper()):
|
||||||
self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING)
|
self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' script:' + fileName ,debug.debugLevel.WARNING)
|
||||||
invalid = True
|
invalid = True
|
||||||
break
|
break
|
||||||
shortcutKeys.append(key.upper())
|
shortcutKeys.append(key.upper())
|
||||||
if invalid:
|
if invalid:
|
||||||
continue
|
continue
|
||||||
if not 'KEY_SCRIPT' in shortcutKeys:
|
if not 'KEY_<
|
||||||
|
SCRIPT' in shortcutKeys:
|
||||||
shortcutKeys.append('KEY_SCRIPT')
|
shortcutKeys.append('KEY_SCRIPT')
|
||||||
shortcut.append(1)
|
shortcut.append(1)
|
||||||
shortcut.append(sorted(shortcutKeys))
|
shortcut.append(sorted(shortcutKeys))
|
||||||
self.env['bindings'][str(shortcut)] = fileName.upper()
|
self.env['bindings'][str(shortcut)] = fileName.upper()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.env['runtime']['debug'].writeDebugOut("Loading script:" + command ,debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut("Loading script:" + fileName ,debug.debugLevel.ERROR)
|
||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
continue
|
continue
|
||||||
def shutdownCommands(self, section):
|
def shutdownCommands(self, section):
|
||||||
|
Loading…
Reference in New Issue
Block a user