From 518491f6f2c7d437f00d82d9d06fda023a6fa064 Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Tue, 29 Nov 2005 22:14:50 +0000 Subject: [PATCH] dont crash when asked for wrong slotID - as done in ScanSetup --- lib/python/Components/NimManager.py | 8 +++++--- 1 file 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] -- 2.30.2