diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-12-23 03:39:50 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-12-23 03:39:50 +0000 |
| commit | f2d8c971838696ff5f4f24717a24be4477b65373 (patch) | |
| tree | fd6ae88e31a9380c1879de7cce4d505699d06ca9 /lib/python/Screens/ServiceInfo.py | |
| parent | ac71afb19a7e78fa3ff05a285c805aaa548a59d2 (diff) | |
| download | enigma2-f2d8c971838696ff5f4f24717a24be4477b65373.tar.gz enigma2-f2d8c971838696ff5f4f24717a24be4477b65373.zip | |
don't crash when service information is unavailable
Diffstat (limited to 'lib/python/Screens/ServiceInfo.py')
| -rw-r--r-- | lib/python/Screens/ServiceInfo.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py index 5973ec20..e4735f41 100644 --- a/lib/python/Screens/ServiceInfo.py +++ b/lib/python/Screens/ServiceInfo.py @@ -75,6 +75,9 @@ class ServiceInfo(Screen): self["blue"] = Label() info = eServiceCenter.getInstance().info(serviceref) self.transponder_info = info.getInfoObject(serviceref, iServiceInformation.sTransponderData) + # info is a iStaticServiceInformation, not a iServiceInformation + self.info = None + self.feinfo = None else: self.type = TYPE_SERVICE_INFO self["red"] = Label(_("Serviceinfo")) @@ -106,8 +109,8 @@ class ServiceInfo(Screen): aspect = "4:3" else: aspect = "16:9" - width = self.info.getInfo(iServiceInformation.sVideoWidth) - height = self.info.getInfo(iServiceInformation.sVideoHeight) + width = self.info and self.info.getInfo(iServiceInformation.sVideoWidth) or -1 + height = self.info and self.info.getInfo(iServiceInformation.sVideoHeight) or -1 if width != -1 and height != -1: Labels = ( ("Name", name, TYPE_TEXT), ("Provider", self.getServiceInfoValue(iServiceInformation.sProvider), TYPE_TEXT), |
