[orca] Fix traceback
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix traceback
- Date: Sat, 18 Apr 2020 17:38:54 +0000 (UTC)
commit 5f914f07cc08481512fcf73383d5317c1439f1d8
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Apr 18 13:37:51 2020 -0400
Fix traceback
src/orca/label_inference.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/label_inference.py b/src/orca/label_inference.py
index 75db7cf45..5212ae755 100644
--- a/src/orca/label_inference.py
+++ b/src/orca/label_inference.py
@@ -606,12 +606,15 @@ class LabelInference:
if not firstRow or list(filter(self._isWidget, firstRow)):
return None, []
- cells = [table.getAccessibleAt(i, col) for i in range(1, table.nRows)]
+ if colindex < 0:
+ return None, []
+
+ cells = [table.getAccessibleAt(i, colindex) for i in range(1, table.nRows)]
cells = [x for x in cells if x is not None]
if [x for x in cells if x.childCount and x[0].getRole() != obj.getRole()]:
return None, []
- label, sources = self._createLabelFromContents(firstRow[col])
+ label, sources = self._createLabelFromContents(firstRow[colindex])
if label:
return label.strip(), sources
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]