From 8d7ab3b08ec975b1acf8e65478ed38613d0b24cc Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 5 Oct 2009 14:29:20 +0200 Subject: NFIFlash downloader: fix possible crash --- lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py index ba668f8b..a1522ddb 100644 --- a/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py +++ b/lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py @@ -54,7 +54,7 @@ class Feedlist(MenuList): def isValid(self): l = self.l.getCurrentSelection() - if l[0] == 0: + if not l or l[0] == 0: return False else: return True -- cgit v1.2.3 From c44754915a36c5c06f1089852bcf6d16ac7ae73c Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 5 Oct 2009 17:50:21 +0200 Subject: fix possible crash --- lib/python/Screens/HelpMenu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Screens/HelpMenu.py b/lib/python/Screens/HelpMenu.py index 74882a35..305e3555 100644 --- a/lib/python/Screens/HelpMenu.py +++ b/lib/python/Screens/HelpMenu.py @@ -25,7 +25,8 @@ class HelpMenu(Screen, Rc): def SelectionChanged(self): self.clearSelectedKeys() selection = self["list"].getCurrent() - selection = selection[3] + if selection: + selection = selection[3] #arrow = self["arrowup"] print "selection:", selection -- cgit v1.2.3 From 5f565fabd83bad38dbd5d79e881743c0fb29dde1 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 5 Oct 2009 20:24:17 +0200 Subject: Mediaplayer: don't crash if writing playlist.e2pls fails --- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index c535e1b1..596f2d5a 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -241,7 +241,10 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB for x in self.playlist.list: self.playlistIOInternal.addService(ServiceReference(x[0])) if self.savePlaylistOnExit: - self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) + try: + self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) + except IOError: + print "couldn't save playlist.e2pls" if config.mediaplayer.saveDirOnExit.getValue(): config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory()) config.mediaplayer.defaultDir.save() -- cgit v1.2.3