[orca/gnome-3-14] Prevent the tutorial generator from returning an empty string



commit e6916cb11fa5c27664f782d86f9a5350ef8a1f7f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Sep 13 02:23:57 2014 -0400

    Prevent the tutorial generator from returning an empty string

 src/orca/tutorialgenerator.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/tutorialgenerator.py b/src/orca/tutorialgenerator.py
index 0f75df2..f2e55b3 100644
--- a/src/orca/tutorialgenerator.py
+++ b/src/orca/tutorialgenerator.py
@@ -781,14 +781,15 @@ class TutorialGenerator:
         if not settings.enableTutorialMessages:
             return []
 
+        utterances = []
         role = obj.getRole()
         if role in self.tutorialGenerators:
             generator = self.tutorialGenerators[role]
         else:
             generator = self._getDefaultTutorial
         msg = generator(obj, alreadyFocused, forceTutorial)
-        utterances = [" ".join(msg)]
         if msg:
+            utterances = [" ".join(msg)]
             self.lastTutorial = msg
         if forceTutorial:
             self.lastTutorial = ""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]