Do not crash if eServiceCenter.info is none
authorNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Sat, 22 May 2010 16:28:17 +0000 (16:28 +0000)
committerNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Sat, 22 May 2010 16:28:17 +0000 (16:28 +0000)
zaphistorybrowser/src/plugin.py

index 33804bc..6a8b350 100644 (file)
@@ -156,13 +156,17 @@ class ZapHistoryBrowser(Screen, ProtectedScreen):
                        else: # Multi-Bouquet
                                ref = x[2]
                        info = self.serviceHandler.info(ref)
-                       name = info.getName(ref).replace('\xc2\x86', '').replace('\xc2\x87', '')
-                       event = info.getEvent(ref)
-                       if event is not None:
-                               eventName = event.getEventName()
-                               if eventName is None:
+                       if info:
+                               name = info.getName(ref).replace('\xc2\x86', '').replace('\xc2\x87', '')
+                               event = info.getEvent(ref)
+                               if event is not None:
+                                       eventName = event.getEventName()
+                                       if eventName is None:
+                                               eventName = ""
+                               else:
                                        eventName = ""
                        else:
+                               name = "N/A"
                                eventName = ""
                        list.append(ZapHistoryBrowserListEntry(name, eventName))
                list.reverse()