4739: Update addon list crashes when working offline with 'plugin_dict referenced before assignment'

svn: r16802
This commit is contained in:
Michiel Nauta 2011-03-10 21:13:47 +00:00
parent 00a07fb05c
commit ef2b19589e

View File

@ -374,8 +374,13 @@ class ViewManager(CLIManager):
for line in lines:
try:
plugin_dict = safe_eval(line)
if type(plugin_dict) != type({}):
raise TypeError("Line with addon metadata is not "
"a dictionary")
except:
pass
LOG.debug("Skipped a line in the addon listing: " +
str(line))
continue
id = plugin_dict["i"]
plugin = self._pmgr.get_plugin(id)
if plugin: