From ef2b19589eb271ae37948c4d8c10ecb1be73b67a Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Thu, 10 Mar 2011 21:13:47 +0000 Subject: [PATCH] 4739: Update addon list crashes when working offline with 'plugin_dict referenced before assignment' svn: r16802 --- src/gui/viewmanager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index 9bc71f72d..9f689874e 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -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: