log failed plugin

Related: https://pagure.io/koji/issue/433
This commit is contained in:
Tomas Kopecek 2017-06-01 15:04:56 +02:00 committed by Mike McLean
parent a3425e95d6
commit b5c5756118

View file

@ -76,6 +76,10 @@ class PluginTracker(object):
file, pathname, description = imp.find_module(name, self.pathlist(path))
try:
plugin = imp.load_module(mod_name, file, pathname, description)
except Exception:
msg = 'Loading plugin %s failed' % name
logging.getLogger('koji.plugin').error(msg)
raise
finally:
file.close()
self.plugins[name] = plugin