[Sugar-devel] [PATCH] Handle missing gst-plugins-espeak gracefully - SL#3345
James Cameron
quozl at laptop.org
Tue Apr 24 19:18:07 EDT 2012
On Tue, Apr 24, 2012 at 10:25:19AM -0300, godiard at sugarlabs.org wrote:
> From: Gonzalo Odiard <godiard at gmail.com>
>
> The text-to-speech support in Sugar (jarabe.model.speech) depends on
> gst-plugins-espeak [1]. While Sugar continues to work properly in the
> absence of gst-plugins-espeak, loading the corresponding components
> (keyboard shortcut handler and Frame device icon) currently fails hard
> and produces a traceback in the log. However TTS support is entirely
> optional and the traceback suggests an unhandled system failure rather
> than optional support not being available. Fix this by catching the
> exception when accessing the SpeechManager and logging a warning
> instead.
>
> [1] https://wiki.sugarlabs.org/go/Activity_Team/gst-plugins-espeak
>
> Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
I agree that the exception should be specific if possible, or if not at
least print the exception as part of the logging.
Also, these words:
> + logging.warning('Text to speech no available. Missing dependencies')
Trigger my english error detector. Perhaps "no available" should be
"not available".
Otherwise, good idea to fix this.
--
James Cameron
http://quozl.linux.org.au/
More information about the Sugar-devel
mailing list