[orca] Don't assume successful name generation when checking its length
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't assume successful name generation when checking its length
- Date: Thu, 29 Mar 2018 19:52:28 +0000 (UTC)
commit 8d73eec99ce27d9d37e1c1465d22fa68830a9db7
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Mar 29 15:51:35 2018 -0400
Don't assume successful name generation when checking its length
src/orca/speech_generator.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index e9d9441..c7583f9 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -449,7 +449,7 @@ class SpeechGenerator(generator.Generator):
labels = self._script.utilities.unrelatedLabels(obj, visibleOnly)
for label in labels:
name = self._generateName(label, **args)
- if name[0] and len(name[0]) == 1:
+ if name and len(name[0]) == 1:
charname = chnames.getCharacterName(name[0])
if charname:
name[0] = charname
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]