#4711 NORM Never A: Text speak support
Zarro Boogs per Child
bugtracker at laptop.org
Thu Nov 8 06:29:50 EST 2007
#4711: Text speak support
---------------------+------------------------------------------------------
Reporter: marco | Owner: codyl
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: sugar | Version:
Resolution: | Keywords:
Verified: 0 |
---------------------+------------------------------------------------------
Changes (by tomeu):
* cc: tomeu (added)
Comment:
+ self._bus = dbus.SessionBus(mainloop = DBusGMainLoop())
Why do you think we should cache the session bus?
+ self._speech_proxy = None
+ try:
+ speech_obj = self._bus.get_object("org.laptop.Speech",
"/org/laptop/Speech")
+ self._speech_proxy = dbus.Interface(speech_obj,
"org.laptop.Speech")
+ except DBusException, ex:
+ logging.error("An error occurred when initializing the ESpeak
service: %r" % (ex, ))
I really think the instantiation of the proxy should be done lazily on the
key handler. Although you catch dbus exceptions,the shell service startup
time will be affected by this, and we don't even know if the user will be
interested in using espeak.
Please see http://wiki.laptop.org/go/Python_Style_Guide. Specially about
using spaces instead of tabs and not having spaces around '=' in named
parameters.
Attached a patch with these fixed.
--
Ticket URL: <http://dev.laptop.org/ticket/4711#comment:3>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list