aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2010-02-04 14:04:20 +0100
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2010-02-04 14:05:15 +0100
commitee589820f97c969057e01c33f99b68c72851f20f (patch)
tree0b1340360f12055139b1c3000b4d60aacb026a6c /lib/python
parent9c0372ef21e444e5196174dce77583c8ab906de4 (diff)
downloadenigma2-ee589820f97c969057e01c33f99b68c72851f20f.tar.gz
enigma2-ee589820f97c969057e01c33f99b68c72851f20f.zip
fixes bug #380
pip is'n available in every state of e2, so don't try to get the status if it's not available
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ServiceStopScreen.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/python/Screens/ServiceStopScreen.py b/lib/python/Screens/ServiceStopScreen.py
index 7f0d26a5..628a93a5 100644
--- a/lib/python/Screens/ServiceStopScreen.py
+++ b/lib/python/Screens/ServiceStopScreen.py
@@ -6,16 +6,26 @@ class ServiceStopScreen:
self.session
except:
print "[ServiceStopScreen] ERROR: no self.session set"
-
+
self.oldref = None
self.onClose.append(self.__onClose)
+ def pipAvailable(self):
+ # pip isn't available in every state of e2
+ try:
+ self.session.pipshown
+ pipavailable = True
+ except:
+ pipavailable = False
+ return pipavailable
+
def stopService(self):
self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
self.session.nav.stopService()
- if self.session.pipshown: # try to disable pip
- self.session.pipshown = False
- del self.session.pip
+ if self.pipAvailable():
+ if self.session.pipshown: # try to disable pip
+ self.session.pipshown = False
+ del self.session.pip
def __onClose(self):
self.session.nav.playService(self.oldref)