[Sugar-devel] [PATCH] Handle missing gst-plugins-espeak gracefully - SL#3345
godiard at sugarlabs.org
Tue Apr 24 09:51:27 EDT 2012
> > def setup(tray):
> > - tray.add_device(SpeechDeviceView())
> > + try:
> > + tray.add_device(SpeechDeviceView())
> > + except:
> > + logging.warning('Text to speech no available. Missing
> Ideally we shouldn't be just catching generic exceptions like above but
> rather specific...
> except <SomeException>:
> Also, instead of logging.warning, maybe a logging.exception would be
In this case, any exception will mean the service is unavailable.
I think is better see the error in the log, and a exception hide the
Really, we have more important problems to solve....
> > diff --git a/extensions/globalkey/speech.py
> > index 2879b69..e47c778 100644
> > --- a/extensions/globalkey/speech.py
> > +++ b/extensions/globalkey/speech.py
> > @@ -14,10 +14,9 @@
> > # along with this program; if not, write to the Free Software
> > # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
> > -from jarabe.model import speech
> > -
> > BOUND_KEYS = ['<alt><shift>s']
> > +from jarabe.model import speech
> Why the need to move this import below the const declaration? Its not
> that way in other extension modules.
My mistake :(
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel