From b47f1ee99b425af13063d2680da7aa7be4d33d27 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Wed, 11 Oct 2006 00:50:00 +0000 Subject: [PATCH] sort list properly in ParentalControlSetup --- lib/python/Screens/ParentalControlSetup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py index 944fc6a2..d17ee73e 100644 --- a/lib/python/Screens/ParentalControlSetup.py +++ b/lib/python/Screens/ParentalControlSetup.py @@ -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: -- 2.30.2