diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-06-19 23:41:34 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-06-19 23:41:34 +0000 |
| commit | 4b058610123896242bfefcb0c55873fb0d2a6a93 (patch) | |
| tree | 9421ff820e61a838eca516bbd9c5098d1d536a86 /lib/python/Components/Converter/StringList.py | |
| parent | 5e2d4c2933c5409409c8554293141ee0a12089f7 (diff) | |
| download | enigma2-4b058610123896242bfefcb0c55873fb0d2a6a93.tar.gz enigma2-4b058610123896242bfefcb0c55873fb0d2a6a93.zip | |
return None (instead of crash) when list is empty, and getCurrent is called
Diffstat (limited to 'lib/python/Components/Converter/StringList.py')
| -rw-r--r-- | lib/python/Components/Converter/StringList.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/Components/Converter/StringList.py b/lib/python/Components/Converter/StringList.py index 4199212a..5d02e9ba 100644 --- a/lib/python/Components/Converter/StringList.py +++ b/lib/python/Components/Converter/StringList.py @@ -25,7 +25,7 @@ class StringList(Converter): @cached def getCurrent(self): - if self.source is None: + if self.source is None or self.index >= len(self.source.list): return None return self.source.list[self.index] @@ -41,5 +41,5 @@ class StringList(Converter): def setIndex(self, index): if self.master is not None: self.master.index = index - + index = property(getIndex, setIndex) |
