Permalink
Browse files

Fix #84 in archive_tw2_resources

  • Loading branch information...
moschlar committed May 22, 2013
1 parent e3bcb87 commit 65493f6ab07b20dc05f1559f6744ac05b688c851
Showing with 3 additions and 5 deletions.
  1. +3 −5 tw2/core/command.py
@@ -186,10 +186,8 @@ def _load_widgets(self, mod):
def _load_widget_entry_points(self, distribution):
try:
requires = [
r.project_name for r in
pkg_resources.get_distribution(distribution).requires()
]
dist = pkg_resources.get_distribution(distribution)
requires = [r.project_name for r in dist.requires()]
map(self._load_widget_entry_points, requires)
@@ -209,7 +207,7 @@ def _load_widget_entry_points(self, distribution):
#TODO -- this should be resolved and standardized in the future.
for ep in pkg_resources.iter_entry_points('tw2.widgets'):
if ep.module_name.startswith(distribution):
if ep.dist == dist:
mod = ep.load()
self._load_widgets(mod)
self.announce("Loaded %s" % mod.__name__)

0 comments on commit 65493f6

Please sign in to comment.