From a80c8953ab5dafd0eb96b9cc19f8c5cb84dcd8e2 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Mon, 3 Apr 2006 14:51:43 +0000 Subject: [PATCH] better readable length check --- lib/python/Components/MovieList.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index 2e861472..2a3cd910 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -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) -- 2.30.2