diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-02 14:19:18 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-02 14:19:18 +0100 |
| commit | 6bda1e2fbc0ba3917516d230882a165f3383c901 (patch) | |
| tree | c2edfefec2fdb1fcac9e143109adf3100d93274f /client | |
| parent | 1e94d8cf72754b8920b8acd1761f11e7d40124dc (diff) | |
| download | jasper-client-6bda1e2fbc0ba3917516d230882a165f3383c901.tar.gz jasper-client-6bda1e2fbc0ba3917516d230882a165f3383c901.zip | |
Improve logging on communication failure with marytts server
Diffstat (limited to 'client')
| -rw-r--r-- | client/tts.py | 9 |
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 |
