sort list properly in ParentalControlSetup
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 11 Oct 2006 00:50:00 +0000 (00:50 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Wed, 11 Oct 2006 00:50:00 +0000 (00:50 +0000)
lib/python/Screens/ParentalControlSetup.py

index 944fc6a..d17ee73 100644 (file)
@@ -185,16 +185,16 @@ class ParentalControlEditor(Screen):
 
        def chooseLetter(self):
                print "choose letter"
-               list = []
+               mylist = []
                for x in self.servicesList.keys():
                        if x == '&':
                                x = ("special characters", x)
                        else:
                                x = (x, x)
-                       list.append(x)
-               print "sorted list:", sorted(list, key=operator.itemgetter(1))
+                       mylist.append(x)
+               mylist.sort(key=operator.itemgetter(1))
                print self.servicesList.keys()
-               self.session.openWithCallback(self.letterChosen, ChoiceBox, title=_("Show services beginning with"), list=list)
+               self.session.openWithCallback(self.letterChosen, ChoiceBox, title=_("Show services beginning with"), list=mylist)
                
        def letterChosen(self, result):
                if result is not None: