aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-29 22:14:50 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-11-29 22:14:50 +0000
commit518491f6f2c7d437f00d82d9d06fda023a6fa064 (patch)
treec4c149bf1bb15f3418f2657ee173418604539be2 /lib/python/Components
parent89a936e39a696d7d4928051b31871f483dd178d1 (diff)
downloadenigma2-518491f6f2c7d437f00d82d9d06fda023a6fa064.tar.gz
enigma2-518491f6f2c7d437f00d82d9d06fda023a6fa064.zip
dont crash when asked for wrong slotID - as done in ScanSetup
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/NimManager.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py
index 18c90f13..0bd40389 100644
--- a/lib/python/Components/NimManager.py
+++ b/lib/python/Components/NimManager.py
@@ -244,11 +244,13 @@ class NimManager:
self.nimTypes[lastsocket] = "empty/unknown"
nimfile.close()
-
def getNimType(self, slotID):
- return self.nimType[self.nimTypes[slotID]]
-
+ if slotID >= self.nimCount:
+ return "empty/unknown"
+ else:
+ return self.nimType[self.nimTypes[slotID]]
+
def getNimName(self, slotID):
return self.nimNames[slotID]