[orca/gnome-2-30] Fix for bgo#618334 - SD python bindings crashes when receiving newline followed by full stop.



commit a0fc8f60fe3b2aa78c62f9065b90cad26538c56d
Author: Mesar Hameed <mhameed src gnome org>
Date:   Mon May 17 07:38:31 2010 +0100

    Fix for bgo#618334 - SD python bindings crashes when receiving newline followed by full stop.

 src/orca/speechdispatcherfactory.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index 96b064d..930658b 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -246,6 +246,12 @@ class SpeechServer(speechserver.SpeechServer):
         # synthesizers cannot handle them.  See bug #591734.
         #
         text = text.decode("UTF-8").replace(u'\u00a0', ' ').encode("UTF-8")
+
+        # Replace newline followed by full stop, since
+        # this seems to crash sd, see bgo#618334.
+        #
+        text = text.replace('\n.', '\n')
+
         self._apply_acss(acss)
         self._send_command(self._client.speak, text, **kwargs)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]