[orca/570658] Remove the 'format' field from args - it's no longer needed.



commit 6595d1ac41129a4da692ca013479b12d7a38d238
Author: Willie Walker <william walker sun com>
Date:   Tue May 12 14:16:11 2009 -0400

    Remove the 'format' field from args - it's no longer needed.
---
 src/orca/altspeechgenerator.py |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/orca/altspeechgenerator.py b/src/orca/altspeechgenerator.py
index 3ed3fd3..3c25a9c 100755
--- a/src/orca/altspeechgenerator.py
+++ b/src/orca/altspeechgenerator.py
@@ -494,7 +494,7 @@ class AltSpeechGenerator:
                         _restoreRole(oldRole, args)
             else:
                 oldRole = _overrideRole('REAL_ROLE_TABLE_CELL',
-                                       args)
+                                        args)
                 result.extend(
                     self.getSpeech(obj, **args))
                 _restoreRole(oldRole, args)
@@ -751,18 +751,6 @@ class AltSpeechGenerator:
             #
             args['role'] = args.get('role', obj.getRole())
 
-            # If someone has already given us the format string to be used
-            # then we dont need to look it up.
-            #
-            format = args.get('format', None)
-            if not format:
-                args['already_focused'] = already_focused
-                format = self._script.formatting.getFormat('speech',
-                                                           **args)
-
-            assert(format)
-            evalString = format
-
             # We loop through the format string, catching each error
             # as we go.  Each error should always be a NameError, where
             # the name is the name of one of our generator functions.
@@ -770,9 +758,13 @@ class AltSpeechGenerator:
             # results, placing them in the generatedResultDict,
             # which serves as the globals for the call to eval.
             #
+            args['already_focused'] = already_focused
+            format = self._script.formatting.getFormat('speech',
+                                                       **args)
+            assert(format)
             while True:
                 try:
-                    result = eval(evalString, generatedResultsDict)
+                    result = eval(format, generatedResultsDict)
                     break
                 except NameError:
                     result = []



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