[orca] Handle exceptions getting pitch and rate during debugging
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Handle exceptions getting pitch and rate during debugging
- Date: Sun, 8 Nov 2015 21:07:38 +0000 (UTC)
commit 87ae6db0a84ad6ab5c35ed6923bbfe4ab44d2583
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 8 16:05:35 2015 -0500
Handle exceptions getting pitch and rate during debugging
src/orca/speechdispatcherfactory.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index 01d0bfb..e999bff 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -232,14 +232,21 @@ class SpeechServer(speechserver.SpeechServer):
if debug.debugLevel > debug.LEVEL_INFO:
return
+ try:
+ sd_rate = self._send_command(self._client.get_rate)
+ sd_pitch = self._send_command(self._client.get_pitch)
+ except:
+ sd_rate = "(exception occurred)"
+ sd_pitch = "(exception occurred)"
+
current = self._current_voice_properties
msg = "SPEECH DISPATCHER: %sOrca rate %s, pitch %s; " \
"SD rate %s, pitch %s" % \
(prefix,
self._current_voice_properties.get(ACSS.RATE),
self._current_voice_properties.get(ACSS.AVERAGE_PITCH),
- self._send_command(self._client.get_rate),
- self._send_command(self._client.get_pitch))
+ sd_rate,
+ sd_pitch)
debug.println(debug.LEVEL_INFO, msg)
def _apply_acss(self, acss):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]