[orca] Fix for bgo#609175 - The sets module is deprecated in python 2.6



commit 528f70f97d1681620ae76a1bb44c9e33ff157449
Author: Mesar Hameed <mhameed src gnome org>
Date:   Sun May 9 16:38:53 2010 +0100

    Fix for bgo#609175 - The sets module is deprecated in python 2.6

 src/orca/scripts/toolkits/Gecko/script.py |    5 ++---
 src/orca/structural_navigation.py         |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index b30a4d8..6681414 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2956,9 +2956,8 @@ class Script(default.Script):
 
         try:
             # ARIA landmark widgets
-            import sets
-            if sets.Set(attrs['xml-roles'].split()).intersection(\
-               sets.Set(settings.ariaLandmarks)):
+            if set(attrs['xml-roles'].split()).intersection(\
+               set(settings.ariaLandmarks)):
                 return True
             # ARIA live region
             elif 'container-live' in attrs:
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 6a94175..5d923df 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -2681,9 +2681,8 @@ class StructuralNavigation:
 
         attrs = dict([attr.split(':', 1) for attr in obj.getAttributes()])
         try:
-            import sets
-            if sets.Set(attrs['xml-roles']).intersection(\
-                sets.Set(settings.ariaLandmarks)):
+            if set(attrs['xml-roles']).intersection(\
+                set(settings.ariaLandmarks)):
                 return True
             else:
                 return False



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