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):
|
def validate_connection(self):
|
||||||
try:
|
try:
|
||||||
subprocess.call([BIN, '--version'])
|
subprocess.call([BIN, '--version'])
|
||||||
except Exception:
|
except Exception as err:
|
||||||
LOG.info("Failed to find mimic at: " + BIN)
|
if BIN:
|
||||||
|
LOG.error('Failed to find mimic at: {}'.format(BIN))
|
||||||
|
else:
|
||||||
|
LOG.error('Mimic executable not found')
|
||||||
raise Exception(
|
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):
|
def get_tts_class(self):
|
||||||
return Mimic
|
return Mimic
|
||||||
|
|
Loading…
Reference in New Issue