Fix: Picard crashes if a plugin can not be loaded.

Signed-off-by: brainz34 <brainz34@musicbrainz.org>
This commit is contained in:
brainz34
2013-04-29 23:03:29 +02:00
parent e16b2533c2
commit 8d82d92a97

View File

@@ -150,7 +150,12 @@ class PluginManager(QtCore.QObject):
def load_plugin(self, name, plugindir):
self.log.debug("Loading plugin %r", name)
info = imp.find_module(name, [plugindir])
try:
info = imp.find_module(name, [plugindir])
except ImportError:
self.log.error("Failed loading plugin %r", name)
return None
plugin = None
try:
index = None