improve debug
This commit is contained in:
parent
c351dbe00b
commit
cebdadf54d
@ -204,10 +204,10 @@ class settingsManager():
|
||||
os.path.dirname(os.path.realpath(__main__.__file__)) + "/" + driverType + '/' + driverName + '.py')
|
||||
self.env['runtime'][driverType] = driver_mod.driver()
|
||||
self.env['runtime'][driverType].initialize(self.env)
|
||||
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType +" OK",debug.debugLevel.INFO, onAnyLevel=True)
|
||||
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") OK",debug.debugLevel.INFO, onAnyLevel=True)
|
||||
except Exception as e:
|
||||
self.env['runtime'][driverType] = None
|
||||
self.env['runtime']['debug'].writeDebugOut("Loading " + driverType + " Driver : "+ str(e), debug.debugLevel.ERROR)
|
||||
self.env['runtime']['debug'].writeDebugOut('Loading Driver ' + driverType + ' (' + driverName +") FAILED:"+ str(e), debug.debugLevel.ERROR)
|
||||
def shutdownDriver(self, driverType):
|
||||
if self.env['runtime'][driverType] == None:
|
||||
return
|
||||
|
@ -80,11 +80,11 @@ class driver():
|
||||
try:
|
||||
self.proc.terminate()
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.ERROR)
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.terminate():' + str(e),debug.debugLevel.WARNING)
|
||||
try:
|
||||
self.proc.kill()
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.ERROR)
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver:Cancel:self.proc.kill():' + str(e),debug.debugLevel.WARNING)
|
||||
self.proc = None
|
||||
self.lock.release()
|
||||
def setCallback(self, callback):
|
||||
|
Loading…
Reference in New Issue
Block a user