better readable length check
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 3 Apr 2006 14:51:43 +0000 (14:51 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 3 Apr 2006 14:51:43 +0000 (14:51 +0000)
lib/python/Components/MovieList.py

index 2e86147..2a3cd91 100644 (file)
@@ -61,9 +61,7 @@ class MovieList(HTMLComponent, GUIComponent):
 
        def getCurrent(self):
                l = self.l.getCurrentSelection()
-               if l is not None:
-                       return self.l.getCurrentSelection()[0]
-               return None
+               return l or l[0]
 
        def GUIcreate(self, parent):
                self.instance = eListbox(parent)