git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
70a0ef2
)
don't crash if no plugins are available
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 24 May 2007 13:17:30 +0000
(13:17 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 24 May 2007 13:17:30 +0000
(13:17 +0000)
lib/python/Screens/PluginBrowser.py
patch
|
blob
|
history
diff --git
a/lib/python/Screens/PluginBrowser.py
b/lib/python/Screens/PluginBrowser.py
index fe81a33d48f05d555b012b4fb8e18a389aeff9f8..b3360b618add3c7b09c1afe46e2d68c48db5563f 100644
(file)
--- a/
lib/python/Screens/PluginBrowser.py
+++ b/
lib/python/Screens/PluginBrowser.py
@@
-99,17
+99,22
@@
class PluginDownloadBrowser(Screen):
})
def go(self):
})
def go(self):
- if type(self["list"].l.getCurrentSelection()[0]) is str: # category
- if self["list"].l.getCurrentSelection()[0] in self.expanded:
- self.expanded.remove(self["list"].l.getCurrentSelection()[0])
+ sel = self["list"].l.getCurrentSelection()
+
+ if sel is None:
+ return
+
+ if type(sel[0]) is str: # category
+ if sel[0] in self.expanded:
+ self.expanded.remove(sel[0])
else:
else:
- self.expanded.append(sel
f["list"].l.getCurrentSelection()
[0])
+ self.expanded.append(sel[0])
self.updateList()
else:
if self.type == self.DOWNLOAD:
self.updateList()
else:
if self.type == self.DOWNLOAD:
- self.session.openWithCallback(self.runInstall, MessageBox, _("Do you really want to download\nthe plugin \"" + sel
f["list"].l.getCurrentSelection()
[0].name + "\"?"))
+ self.session.openWithCallback(self.runInstall, MessageBox, _("Do you really want to download\nthe plugin \"" + sel[0].name + "\"?"))
elif self.type == self.REMOVE:
elif self.type == self.REMOVE:
- self.session.openWithCallback(self.runInstall, MessageBox, _("Do you really want to REMOVE\nthe plugin \"" + sel
f["list"].l.getCurrentSelection()
[0].name + "\"?"))
+ self.session.openWithCallback(self.runInstall, MessageBox, _("Do you really want to REMOVE\nthe plugin \"" + sel[0].name + "\"?"))
def runInstall(self, val):
if val:
def runInstall(self, val):
if val: