Skip to content

Commit

Permalink
Merge pull request #699 from astrofrog/fix-plugin-loading
Browse files Browse the repository at this point in the history
Fix plugin loading
  • Loading branch information
astrofrog committed Aug 8, 2015
2 parents 7372b58 + 785b104 commit 96f83aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ v0.6 (unreleased)
v0.5.2 (unreleased)
-------------------

* No changes yet
* Fix loading of plugins with setuptools < 11.3

v0.5.1 (2015-07-06)
-------------------
Expand Down
5 changes: 3 additions & 2 deletions glue/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ def load_plugins():
# where ``setup`` is a function that does whatever is needed to set up the
# plugin, such as add items to various registries.

logger.info("Loading external plugins")
import setuptools
logger.info("Loading external plugins using setuptools=={0}".format(setuptools.__version__))
from ._plugin_helpers import iter_plugin_entry_points
for item in iter_plugin_entry_points():
if item.module_name in _loaded_plugins:
logger.info("Plugin {0} already loaded".format(item.name))
continue
try:
function = item.resolve()
function = item.load()
function()
except Exception as exc:
logger.info("Loading plugin {0} failed (Exception: {1})".format(item.name, exc))
Expand Down

0 comments on commit 96f83aa

Please sign in to comment.