[blindscan] fixed bug in ScanNimsocket function.
authorkos <kos@dev3>
Thu, 10 Oct 2013 06:54:56 +0000 (15:54 +0900)
committerkos <kos@dev3>
Thu, 10 Oct 2013 06:54:56 +0000 (15:54 +0900)
lib/python/Plugins/SystemPlugins/Blindscan/plugin.py

index faeb9d9..44128e2 100644 (file)
@@ -96,9 +96,13 @@ class Blindscan(ConfigListScreen, Screen):
                for line in fp:
                        line = line.strip()
                        if line.startswith('NIM Socket'):
-                               sNo = line.split()[2][:-1]
+                               try:
+                                       sNo = line.split()[2][:-1]
+                               except: sNo = -1
                        elif line.startswith('Name:'):
-                               sName = line.split()[3][4:-1]
+                               try:
+                                       sName = line.split()[3][4:-1]
+                               except: sName = ""
                        if sNo >= 0 and sName != "":
                                _nimSocket[sNo] = sName
                                sNo   = -1