Fix logs when Mimic is not found
If Mimic was not found at all the LOG message would raise an exception, this fixes that issue and cleans up Exception chainpull/2718/head
parent
58415e71d4
commit
a2dc3482ef
|
@ -185,10 +185,14 @@ class MimicValidator(TTSValidator):
|
|||
def validate_connection(self):
|
||||
try:
|
||||
subprocess.call([BIN, '--version'])
|
||||
except Exception:
|
||||
LOG.info("Failed to find mimic at: " + BIN)
|
||||
except Exception as err:
|
||||
if BIN:
|
||||
LOG.error('Failed to find mimic at: {}'.format(BIN))
|
||||
else:
|
||||
LOG.error('Mimic executable not found')
|
||||
raise Exception(
|
||||
'Mimic was not found. Run install-mimic.sh to install it.')
|
||||
'Mimic was not found. Run install-mimic.sh to install it.') \
|
||||
from err
|
||||
|
||||
def get_tts_class(self):
|
||||
return Mimic
|
||||
|
|
Loading…
Reference in New Issue