cast choices to a list because .index method DNE in python2.5 for tuple
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 26 Jun 2009 15:37:23 +0000 (15:37 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 26 Jun 2009 15:37:23 +0000 (15:37 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11294 221aa14e-8319-0410-a670-987f0aec2ac5

gr-wxgui/src/python/forms/converters.py

index e535cb2dd1f6e217734019120a74c392793851a5..9f757aa8410eb24b7d226e9c828da4caa8a2fd6c 100644 (file)
@@ -53,7 +53,8 @@ class chooser_converter(abstract_converter):
        Used in the chooser base and all sub-classes.
        """
        def __init__(self, choices):
-               self._choices = choices
+               #choices must be a list because tuple does not have .index() in python2.5
+               self._choices = list(choices)
        def external_to_internal(self, choice):
                return self._choices.index(choice)
        def internal_to_external(self, index):