diff --git a/src/fenrir/screenDriver/linux.py b/src/fenrir/screenDriver/linux.py index 654aae72..bf2b28d8 100644 --- a/src/fenrir/screenDriver/linux.py +++ b/src/fenrir/screenDriver/linux.py @@ -34,7 +34,7 @@ class driver(): currScreen = self.env['screenData']['newTTY'] apps = subprocess.Popen('ps -t tty' + currScreen + ' -o comm,tty,stat', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n') except Exception as e: - print(e) + self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) return try: for i in apps: diff --git a/src/fenrir/speechDriver/espeak.py b/src/fenrir/speechDriver/espeak.py index 18e960c0..dd3c75ed 100644 --- a/src/fenrir/speechDriver/espeak.py +++ b/src/fenrir/speechDriver/espeak.py @@ -11,14 +11,17 @@ class driver(): def __init__(self ): self._es = None self._isInitialized = False + + def initialize(self, environment): + self.env = environment try: from espeak import espeak self._es = espeak self._isInitialized = True - except: + except Exception as e: + self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) self._initialized = False - def initialize(self, environment): - self.env = environment + def shutdown(self): pass diff --git a/src/fenrir/speechDriver/speechd.py b/src/fenrir/speechDriver/speechd.py index 4619b044..ca8daa15 100644 --- a/src/fenrir/speechDriver/speechd.py +++ b/src/fenrir/speechDriver/speechd.py @@ -12,15 +12,18 @@ class driver(): self._sd = None self._isInitialized = False self._language = '' + + def initialize(self, environment): + self.env = environment try: import speechd self._sd = speechd.SSIPClient('fenrir') self._punct = speechd.PunctuationMode() self._isInitialized = True - except: + except Exception as e: + self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) self._initialized = False - def initialize(self, environment): - self.env = environment + def shutdown(self): if not self._isInitialized: return