catch some driver calls

This commit is contained in:
chrys 2018-05-11 23:34:13 +02:00
parent e812d4e2ae
commit 426fecf60f
2 changed files with 14 additions and 9 deletions

View File

@ -158,6 +158,7 @@ class screenManager():
return ''
if attributeFormatString == '':
return ''
try:
attributeFormatString = attributeFormatString.replace('fenrirBGColor', self.env['runtime']['screenDriver'].getFenrirBGColor(attribute))
attributeFormatString = attributeFormatString.replace('fenrirFGColor', self.env['runtime']['screenDriver'].getFenrirFGColor(attribute))
attributeFormatString = attributeFormatString.replace('fenrirUnderline', self.env['runtime']['screenDriver'].getFenrirUnderline(attribute))
@ -165,6 +166,8 @@ class screenManager():
attributeFormatString = attributeFormatString.replace('fenrirBlink', self.env['runtime']['screenDriver'].getFenrirBlink(attribute))
attributeFormatString = attributeFormatString.replace('fenrirFontSize', self.env['runtime']['screenDriver'].getFenrirFontSize(attribute))
attributeFormatString = attributeFormatString.replace('fenrirFont', self.env['runtime']['screenDriver'].getFenrirFont(attribute))
except Exception as e:
pass
return attributeFormatString
def isSuspendingScreen(self, screen = None):
if screen == None:
@ -212,7 +215,6 @@ class screenManager():
try:
self.env['runtime']['screenDriver'].injectTextToScreen(text, screen)
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut('screenManager:injectTextToScreen ' + str(e),debug.debugLevel.ERROR)
def changeBrailleScreen(self):

View File

@ -153,7 +153,10 @@ class settingsManager():
def shutdownDriver(self, driverType):
if self.env['runtime'][driverType] == None:
return
try:
self.env['runtime'][driverType].shutdown()
except Exception as e:
pass
del self.env['runtime'][driverType]
def setFenrirKeys(self, keys):