summaryrefslogtreecommitdiff
path: root/client/tts.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-12-02 14:37:13 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2014-12-02 14:37:13 +0100
commitbb0880be651d2478e8eab013a61eff8384f6e002 (patch)
treec2edfefec2fdb1fcac9e143109adf3100d93274f /client/tts.py
parent1e94d8cf72754b8920b8acd1761f11e7d40124dc (diff)
parent6bda1e2fbc0ba3917516d230882a165f3383c901 (diff)
downloadjasper-client-bb0880be651d2478e8eab013a61eff8384f6e002.tar.gz
jasper-client-bb0880be651d2478e8eab013a61eff8384f6e002.zip
Merge pull request #256 from Holzhaus/marytts-logging-improvements
Improve logging on communication failure with marytts server
Diffstat (limited to 'client/tts.py')
-rw-r--r--client/tts.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/tts.py b/client/tts.py
index 88625ad..1cd95df 100644
--- a/client/tts.py
+++ b/client/tts.py
@@ -419,8 +419,13 @@ class MaryTTS(AbstractTTSEngine):
@property
def languages(self):
- r = self.session.get(self._makeurl('/locales'))
- r.raise_for_status()
+ try:
+ r = self.session.get(self._makeurl('/locales'))
+ r.raise_for_status()
+ except requests.exceptions.RequestException:
+ self._logger.critical("Communication with MaryTTS server at %s " +
+ "failed.", self.netloc)
+ raise
return r.text.splitlines()
@property