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 2e8614729c4873f69ee7fd2fc71c83350dc1b98d..2a3cd910fea6b0c88f8ea9836e952de61b42e63d 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)