[orca] Fix for bug 673757 - Pages with alt attribute present but not actually set results in traceback in w
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 673757 - Pages with alt attribute present but not actually set results in traceback in w
- Date: Mon, 9 Apr 2012 16:44:15 +0000 (UTC)
commit 01fbfde90f677bf0a8ab64c7e2a4340b9714773d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Apr 9 12:42:48 2012 -0400
Fix for bug 673757 - Pages with alt attribute present but not actually set results in traceback in webkitgtk content
.../scripts/toolkits/WebKitGtk/script_utilities.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
index 195d22d..151fc76 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -1,7 +1,7 @@
# Orca
#
# Copyright (C) 2010 Joanmarie Diggs
-# Copyright (C) 2011 Igalia, S.L.
+# Copyright (C) 2011-2012 Igalia, S.L.
#
# Author: Joanmarie Diggs <jdiggs igalia com>
#
@@ -24,7 +24,7 @@ __id__ = "$Id$"
__version__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2010 Joanmarie Diggs." \
- "Copyright (c) 2011 Igalia, S.L."
+ "Copyright (c) 2011-2012 Igalia, S.L."
__license__ = "LGPL"
import pyatspi
@@ -151,7 +151,10 @@ class Utilities(script_utilities.Utilities):
offsets = filter(lambda x: start <= x < end, offsets)
objects = []
- objs = [obj[htext.getLinkIndex(offset)] for offset in offsets]
+ try:
+ objs = [obj[htext.getLinkIndex(offset)] for offset in offsets]
+ except:
+ objs = []
ranges = [self.getHyperlinkRange(x) for x in objs]
for i, (first, last) in enumerate(ranges):
objects.append((obj, start, first, string[start:first]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]