[orca] Fix for BGO#615968 - Catch some exceptions
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for BGO#615968 - Catch some exceptions
- Date: Sat, 5 Jun 2010 21:46:52 +0000 (UTC)
commit 7a6a9d079bebfbe373da633ced2f1db247604e6d
Author: Mike Gorse <mgorse novell com>
Date: Sat Jun 5 17:47:17 2010 -0400
Fix for BGO#615968 - Catch some exceptions
src/orca/debug.py | 9 ++++++---
src/orca/focus_tracking_presenter.py | 6 ++++++
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/debug.py b/src/orca/debug.py
index 7e5967b..51d7425 100644
--- a/src/orca/debug.py
+++ b/src/orca/debug.py
@@ -237,9 +237,12 @@ def getAccessibleDetails(acc, indent="", includeApp=True):
else:
rel_string = ''
- string += "name='%s' role='%s' state='%s' relations='%s'" \
- % (acc.name or 'None', acc.getRoleName(),
- state_string, rel_string)
+ try:
+ string += "name='%s' role='%s' state='%s' relations='%s'" \
+ % (acc.name or 'None', acc.getRoleName(),
+ state_string, rel_string)
+ except DataError:
+ string += "(exception fetching data)"
return string
diff --git a/src/orca/focus_tracking_presenter.py b/src/orca/focus_tracking_presenter.py
index 5a0b6ee..56bce56 100644
--- a/src/orca/focus_tracking_presenter.py
+++ b/src/orca/focus_tracking_presenter.py
@@ -563,6 +563,12 @@ class FocusTrackingPresenter(presentation_manager.PresentationManager):
debug.printDetails(debug.LEVEL_FINEST, " ", event.source)
except LookupError:
+ if event.type.startswith("window:deactivate"):
+ debug.println(debug.LEVEL_FINEST,
+ "LookupError in deactivate event; clearing focus")
+ orca.setLocusOfFocus(event, None)
+ orca_state.activeWindow = None
+ return
debug.printException(debug.LEVEL_WARNING)
debug.println(debug.LEVEL_WARNING,
"LookupError above while processing event: %s" %\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]