Make sure all except statements are no longer empty, should help a lot with debugging.
This commit is contained in:
@ -74,8 +74,8 @@ class attributeManager():
|
||||
except KeyError:
|
||||
try:
|
||||
return self.defaultAttributes[0]
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('attributeManager getAttributeByXY: Error accessing default attributes: ' + str(e), debug.debugLevel.ERROR)
|
||||
return None
|
||||
def appendDefaultAttributes(self, attribute):
|
||||
if not attribute:
|
||||
@ -214,12 +214,12 @@ class attributeManager():
|
||||
try:
|
||||
try:
|
||||
attributeFormatString = attributeFormatString.replace('fenrirFontSize', int(attribute[8]))
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('attributeManager formatAttributeToString: Error formatting font size as int: ' + str(e), debug.debugLevel.ERROR)
|
||||
try:
|
||||
attributeFormatString = attributeFormatString.replace('fenrirFontSize', str(attribute[8]))
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('attributeManager formatAttributeToString: Error formatting font size as string: ' + str(e), debug.debugLevel.ERROR)
|
||||
except Exception as e:
|
||||
pass
|
||||
attributeFormatString = attributeFormatString.replace('fenrirFontSize', _('default'))
|
||||
|
@ -58,8 +58,8 @@ class byteManager():
|
||||
return
|
||||
try:
|
||||
self.env['runtime']['debug'].writeDebugOut("handleByteInput " + eventData.decode('utf8') ,debug.debugLevel.INFO)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('byteManager handleByteInput: Error decoding byte data: ' + str(e), debug.debugLevel.ERROR)
|
||||
self.handleByteStream(eventData)
|
||||
def handleSingleByteSequence(self, eventData):
|
||||
convertedEscapeSequence = self.unifyEscapeSeq(eventData)
|
||||
@ -140,7 +140,8 @@ class byteManager():
|
||||
try:
|
||||
repeat = int(chr(cleanShortcut[0]))
|
||||
cleanShortcut = cleanShortcut[2:]
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('byteManager loadByteShortcuts: Error parsing repeat count: ' + str(e), debug.debugLevel.ERROR)
|
||||
repeat = 1
|
||||
cleanShortcut = cleanShortcut
|
||||
shortcut = b''
|
||||
|
@ -87,7 +87,7 @@ class commandManager():
|
||||
try:
|
||||
if self.env['commands'][section][fileName.upper()] != None:
|
||||
continue
|
||||
except:
|
||||
except Exception as e:
|
||||
pass
|
||||
if fileExtension.lower() == '.py':
|
||||
command_mod = module_utils.importModule(fileName, command)
|
||||
@ -249,7 +249,7 @@ class commandManager():
|
||||
def commandExists(self, command, section = 'commands'):
|
||||
try:
|
||||
return( command in self.env['commands'][section])
|
||||
except:
|
||||
except Exception as e:
|
||||
return False
|
||||
def getShortcutForCommand(self, command, formatKeys = False):
|
||||
shortcut = []
|
||||
@ -282,6 +282,6 @@ class commandManager():
|
||||
formattedKey = formattedKey.replace('key_kp', ' keypad ')
|
||||
formattedKey = formattedKey.replace('key_', ' ')
|
||||
shortcut.append(formattedKey)
|
||||
except:
|
||||
except Exception as e:
|
||||
pass
|
||||
return shortcut
|
||||
|
@ -87,8 +87,8 @@ class cursorManager():
|
||||
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||
if self.env['commandBuffer']['windowArea'][currApp]['1'] != None:
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('cursorManager isApplicationWindowSet: Error checking window area: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
def setWindowForApplication(self, start = None, end = None):
|
||||
x1 = 0
|
||||
@ -129,6 +129,7 @@ class cursorManager():
|
||||
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||
try:
|
||||
del self.env['commandBuffer']['windowArea'][currApp]
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('cursorManager clearWindowForApplication: Error clearing window area: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
return True
|
||||
|
@ -19,8 +19,9 @@ class debugManager():
|
||||
def __del__(self):
|
||||
try:
|
||||
self.shutdown()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
# Cannot use debug manager to log its own shutdown errors
|
||||
print(f'debugManager shutdown: Error during shutdown: {e}')
|
||||
|
||||
def openDebugFile(self, fileName = ''):
|
||||
self._fileOpened = False
|
||||
|
@ -159,8 +159,8 @@ class DynamicApplyVoiceCommand:
|
||||
speechDriver = self.env['runtime']['speechDriver']
|
||||
speechDriver.shutdown()
|
||||
speechDriver.initialize(self.env)
|
||||
except:
|
||||
pass # If this fails, at least we tried
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('dynamicVoiceMenu: Error reinitializing speech driver: ' + str(e), debug.debugLevel.ERROR)
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(f"Failed to apply voice, reverted: {str(e)}", interrupt=False, flush=False)
|
||||
|
||||
|
@ -138,8 +138,8 @@ class fenrirManager():
|
||||
def handlePlugInputDevice(self, event):
|
||||
try:
|
||||
self.environment['runtime']['inputManager'].setLastDetectedDevices(event['Data'])
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.environment['runtime']['debug'].writeDebugOut('handlePlugInputDevice: Error setting last detected devices: ' + str(e), debug.debugLevel.ERROR)
|
||||
self.environment['runtime']['inputManager'].handlePlugInputDevice(event['Data'])
|
||||
self.environment['runtime']['commandManager'].executeDefaultTrigger('onPlugInputDevice', force=True)
|
||||
self.environment['runtime']['inputManager'].setLastDetectedDevices(None)
|
||||
@ -200,16 +200,16 @@ class fenrirManager():
|
||||
stringBuffer.value = bytes(name, 'UTF-8')
|
||||
libc.prctl(15, byref(stringBuffer), 0, 0, 0)
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.environment['runtime']['debug'].writeDebugOut('setProcName: Error setting process name: ' + str(e), debug.debugLevel.ERROR)
|
||||
|
||||
return False
|
||||
|
||||
def shutdownRequest(self):
|
||||
try:
|
||||
self.environment['runtime']['eventManager'].stopMainEventLoop()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.environment['runtime']['debug'].writeDebugOut('shutdownRequest: Error stopping main event loop: ' + str(e), debug.debugLevel.ERROR)
|
||||
|
||||
def captureSignal(self, sigInit, frame):
|
||||
self.shutdownRequest()
|
||||
|
@ -30,8 +30,8 @@ class helpManager():
|
||||
else:
|
||||
try:
|
||||
self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('helpManager setTutorialMode: Error restoring binding backup: ' + str(e), debug.debugLevel.ERROR)
|
||||
def isTutorialMode(self):
|
||||
return self.env['general']['tutorialMode']
|
||||
def getFormattedShortcutForCommand(self, command):
|
||||
|
@ -76,5 +76,5 @@ class inputDriver():
|
||||
return
|
||||
try:
|
||||
self.removeAllDevices()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(f'inputDriver __del__: Error removing devices: {str(e)}')
|
||||
|
@ -44,8 +44,8 @@ class inputManager():
|
||||
event = None
|
||||
try:
|
||||
event = self.env['runtime']['inputDriver'].getInputEvent()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager getInputEvent: Error getting input event: ' + str(e), debug.debugLevel.ERROR)
|
||||
return event
|
||||
def setExecuteDeviceGrab(self, newExecuteDeviceGrab = True):
|
||||
self.executeDeviceGrab = newExecuteDeviceGrab
|
||||
@ -77,8 +77,8 @@ class inputManager():
|
||||
# Force a release of devices if possible through alternative means
|
||||
try:
|
||||
self.env['runtime']['inputDriver'].forceUngrab()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager handleDeviceGrab: Error forcing ungrab: ' + str(e), debug.debugLevel.ERROR)
|
||||
break
|
||||
time.sleep(0.25)
|
||||
self.env['runtime']['debug'].writeDebugOut(f"retry ungrabAllDevices {retryCount}/{maxRetries}", debug.debugLevel.WARNING)
|
||||
@ -170,8 +170,8 @@ class inputManager():
|
||||
self.env['runtime']['inputDriver'].toggleLedState(1)
|
||||
elif mEvent['EventName'] == 'KEY_SCROLLLOCK':
|
||||
self.env['runtime']['inputDriver'].toggleLedState(2)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager handleLedStates: Error toggling LED state: ' + str(e), debug.debugLevel.ERROR)
|
||||
def grabAllDevices(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'):
|
||||
try:
|
||||
@ -192,18 +192,18 @@ class inputManager():
|
||||
def updateInputDevices(self, newDevice = None):
|
||||
try:
|
||||
self.env['runtime']['inputDriver'].updateInputDevices(newDevice)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager updateInputDevices: Error updating input devices: ' + str(e), debug.debugLevel.ERROR)
|
||||
try:
|
||||
if self.env['runtime']['screenManager']:
|
||||
self.handleDeviceGrab(force = True)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager updateInputDevices: Error handling device grab: ' + str(e), debug.debugLevel.ERROR)
|
||||
def removeAllDevices(self):
|
||||
try:
|
||||
self.env['runtime']['inputDriver'].removeAllDevices()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('inputManager removeAllDevices: Error removing devices: ' + str(e), debug.debugLevel.ERROR)
|
||||
|
||||
def convertEventName(self, eventName):
|
||||
if not eventName:
|
||||
@ -364,7 +364,7 @@ class inputManager():
|
||||
for key in keys:
|
||||
try:
|
||||
shortcutRepeat = int(key)
|
||||
except:
|
||||
except Exception as e:
|
||||
if not self.isValidKey(key.upper()):
|
||||
self.env['runtime']['debug'].writeDebugOut("invalid key : "+ key.upper() + ' command:' +commandName ,debug.debugLevel.WARNING)
|
||||
invalid = True
|
||||
|
@ -102,7 +102,8 @@ class memoryManager():
|
||||
return False
|
||||
try:
|
||||
return self.listStorage[name]['index']
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('memoryManager getCurrentIndex: Error accessing index for ' + name + ': ' + str(e), debug.debugLevel.ERROR)
|
||||
return -1
|
||||
def isIndexListEmpty(self, name):
|
||||
if not self.listStorageValid(name):
|
||||
@ -119,5 +120,6 @@ class memoryManager():
|
||||
return None
|
||||
try:
|
||||
return self.listStorage[name]['list'][currIndex]
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('memoryManager getIndexListElement: Error accessing element for ' + name + ': ' + str(e), debug.debugLevel.ERROR)
|
||||
return None
|
||||
|
@ -111,8 +111,8 @@ class outputManager():
|
||||
try:
|
||||
self.env['runtime']['speechDriver'].cancel()
|
||||
self.env['runtime']['debug'].writeDebugOut("Interrupt speech", debug.debugLevel.INFO)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('outputManager interruptOutput: Error canceling speech: ' + str(e), debug.debugLevel.ERROR)
|
||||
|
||||
def playSoundIcon(self, soundIcon='', interrupt=True):
|
||||
if soundIcon == '':
|
||||
@ -124,8 +124,8 @@ class outputManager():
|
||||
|
||||
try:
|
||||
e = self.env['soundIcons'][soundIcon]
|
||||
except:
|
||||
self.env['runtime']['debug'].writeDebugOut("SoundIcon doesnt exist: " + soundIcon, debug.debugLevel.WARNING)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('outputManager playSoundIcon: SoundIcon does not exist ' + soundIcon + ': ' + str(e), debug.debugLevel.WARNING)
|
||||
return False
|
||||
|
||||
if self.env['runtime']['soundDriver'] == None:
|
||||
@ -166,8 +166,8 @@ class outputManager():
|
||||
adjustVolume = 0.0
|
||||
try:
|
||||
adjustVolume = 1.0 - (frequence / 20000)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('outputManager playFrequence: Error calculating adjust volume: ' + str(e), debug.debugLevel.ERROR)
|
||||
if adjustVolume > 9.0:
|
||||
adjustVolume = 9.0
|
||||
|
||||
|
@ -35,8 +35,8 @@ class processManager():
|
||||
def heartBeatTimer(self, active):
|
||||
try:
|
||||
time.sleep(0.5)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('processManager heartBeatTimer: Error during sleep: ' + str(e), debug.debugLevel.ERROR)
|
||||
return time.time()
|
||||
def addCustomEventThread(self, function, pargs = None, multiprocess = False, runOnce = False):
|
||||
eventQueue = self.env['runtime']['eventManager'].getEventQueue()
|
||||
|
@ -31,7 +31,7 @@ class punctuationManager():
|
||||
for char in currLevel:
|
||||
try:
|
||||
del currAllPunctNone[ord(char)]
|
||||
except:
|
||||
except Exception as e:
|
||||
pass
|
||||
return text.translate(currAllPunctNone)
|
||||
def useCustomDict(self, text, customDict, seperator=''):
|
||||
@ -84,7 +84,7 @@ class punctuationManager():
|
||||
punctList = list(self.env['punctuation']['LEVELDICT'].keys())
|
||||
try:
|
||||
currIndex = punctList.index(self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()) # curr punctuation
|
||||
except:
|
||||
except Exception as e:
|
||||
return False
|
||||
currIndex += 1
|
||||
if currIndex >= len(punctList):
|
||||
|
@ -30,7 +30,8 @@ class quickMenuManager():
|
||||
continue
|
||||
try:
|
||||
t = self.settings[entry[0]][entry[1]]
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('quickMenuManager loadMenu: Setting not found ' + str(entry) + ': ' + str(e), debug.debugLevel.ERROR)
|
||||
print(entry[0],entry[1], 'not found')
|
||||
continue
|
||||
self.quickMenu.append({'section': entry[0], 'setting': entry[1]})
|
||||
@ -56,7 +57,8 @@ class quickMenuManager():
|
||||
valueString = ''
|
||||
try:
|
||||
valueString = self.env['runtime']['settingsManager'].getSetting(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('quickMenuManager nextValue: Error getting setting value: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
|
||||
try:
|
||||
@ -89,7 +91,8 @@ class quickMenuManager():
|
||||
valueString = ''
|
||||
try:
|
||||
valueString = self.env['runtime']['settingsManager'].getSetting(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('quickMenuManager prevValue: Error getting setting value: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
try:
|
||||
if isinstance(self.settings[section][setting], str):
|
||||
@ -120,12 +123,14 @@ class quickMenuManager():
|
||||
return ''
|
||||
try:
|
||||
return _(self.quickMenu[self.position]['section']) + ' ' + _(self.quickMenu[self.position]['setting'])
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('quickMenuManager getCurrentEntry: Error formatting entry: ' + str(e), debug.debugLevel.ERROR)
|
||||
return _('setting invalid')
|
||||
def getCurrentValue(self):
|
||||
if len(self.quickMenu) == 0:
|
||||
return ''
|
||||
try:
|
||||
return self.env['runtime']['settingsManager'].getSetting(self.quickMenu[self.position]['section'], self.quickMenu[self.position]['setting'])
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('quickMenuManager getCurrentValue: Error getting setting value: ' + str(e), debug.debugLevel.ERROR)
|
||||
return _('setting value invalid')
|
||||
|
@ -252,7 +252,7 @@ class remoteManager():
|
||||
else:
|
||||
clipboardFile.write('')
|
||||
clipboardFile.close()
|
||||
os.chmod(clipboardFilePath, 0o666)
|
||||
os.chmod(clipboardFilePath, 0o644)
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('export_clipboard_to_file:run: Filepath:'+ clipboardFile +' trace:' + str(e),debug.debugLevel.ERROR)
|
||||
|
@ -41,13 +41,13 @@ class screenManager():
|
||||
def getCurrScreen(self):
|
||||
try:
|
||||
self.env['runtime']['screenDriver'].getCurrScreen()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('screenManager getCurrScreen: Error getting current screen: ' + str(e), debug.debugLevel.ERROR)
|
||||
def getSessionInformation(self):
|
||||
try:
|
||||
self.env['runtime']['screenDriver'].getSessionInformation()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('screenManager getSessionInformation: Error getting session info: ' + str(e), debug.debugLevel.ERROR)
|
||||
def shutdown(self):
|
||||
self.env['runtime']['settingsManager'].shutdownDriver('screenDriver')
|
||||
def isCurrScreenIgnoredChanged(self):
|
||||
|
@ -94,7 +94,8 @@ class settingsManager():
|
||||
self.env['settings'] = ConfigParser()
|
||||
try:
|
||||
self.env['settings'].read(settingConfigPath)
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('settingsManager loadSettings: Error reading config file: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
self.setSettingsFile(settingConfigPath)
|
||||
return True
|
||||
@ -112,7 +113,7 @@ class settingsManager():
|
||||
configFile = open(settingConfigPath, 'w')
|
||||
self.env['settings'].write(configFile)
|
||||
configFile.close()
|
||||
os.chmod(settingConfigPath, 0o666)
|
||||
os.chmod(settingConfigPath, 0o644)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('saveSettings: save settingsfile:' + settingConfigPath + 'failed. Error:' + str(e), debug.debugLevel.ERROR)
|
||||
def setSetting(self, section, setting, value):
|
||||
@ -124,11 +125,11 @@ class settingsManager():
|
||||
try:
|
||||
value = self.settingArgDict[section][setting]
|
||||
return value
|
||||
except:
|
||||
except Exception as e:
|
||||
pass
|
||||
try:
|
||||
value = self.env['settings'].get(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
value = str(self.settings[section][setting])
|
||||
return value
|
||||
|
||||
@ -141,7 +142,7 @@ class settingsManager():
|
||||
pass
|
||||
try:
|
||||
value = self.env['settings'].getint(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
|
||||
@ -154,7 +155,7 @@ class settingsManager():
|
||||
pass
|
||||
try:
|
||||
value = self.env['settings'].getfloat(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
|
||||
@ -167,15 +168,15 @@ class settingsManager():
|
||||
pass
|
||||
try:
|
||||
value = self.env['settings'].getboolean(section, setting)
|
||||
except:
|
||||
except Exception as e:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
|
||||
def loadDriver(self, driverName, driverType):
|
||||
try:
|
||||
self.env['runtime'][driverType].shutdown(self.env)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('settingsManager loadDriver: Error shutting down driver: ' + str(e), debug.debugLevel.ERROR)
|
||||
try:
|
||||
driver_mod = module_utils.importModule(driverName,
|
||||
fenrirPath + "/" + driverType + '/' + driverName + '.py')
|
||||
@ -223,7 +224,7 @@ class settingsManager():
|
||||
self.settingArgDict[section] = {}
|
||||
try:
|
||||
t = self.settings[section][setting]
|
||||
except:
|
||||
except Exception as e:
|
||||
print(section,setting, 'not found')
|
||||
return
|
||||
try:
|
||||
|
@ -147,8 +147,8 @@ class vmenuManager():
|
||||
try:
|
||||
self.currIndex = None
|
||||
self.env['bindings'] = self.env['runtime']['settingsManager'].getBindingBackup()
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('vmenuManager setActive: Error loading binding backup: ' + str(e), debug.debugLevel.ERROR)
|
||||
def createMenuTree(self, resetIndex = True):
|
||||
if resetIndex:
|
||||
self.currIndex = None
|
||||
@ -169,7 +169,8 @@ class vmenuManager():
|
||||
r = self.getValueByPath(self.menuDict, self.currIndex)
|
||||
if r == {}:
|
||||
self.currIndex = None
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('vmenuManager createMenuTree: Error checking menu index validity: ' + str(e), debug.debugLevel.ERROR)
|
||||
self.currIndex = None
|
||||
def executeMenu(self):
|
||||
if self.currIndex == None:
|
||||
@ -185,8 +186,8 @@ class vmenuManager():
|
||||
self.incLevel()
|
||||
text = self.getCurrentEntry()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
except:
|
||||
print(e)
|
||||
except Exception as ex:
|
||||
self.env['runtime']['debug'].writeDebugOut('vmenuManager executeMenu: Error presenting menu text: ' + str(ex), debug.debugLevel.ERROR)
|
||||
|
||||
def incLevel(self):
|
||||
if self.currIndex == None:
|
||||
@ -195,7 +196,8 @@ class vmenuManager():
|
||||
r = self.getValueByPath(self.menuDict, self.currIndex +[0])
|
||||
if r == {}:
|
||||
return False
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('vmenuManager incLevel: Error accessing menu path: ' + str(e), debug.debugLevel.ERROR)
|
||||
return False
|
||||
self.currIndex.append(0)
|
||||
return True
|
||||
|
Reference in New Issue
Block a user