Permalink
Browse files

Fix #84 in archive_tw2_resources

  • Loading branch information...
moschlar committed May 22, 2013
1 parent f6d1f05 commit 02eec525f83077d4bb1541e67c9ca5e40a971f1b
Showing with 3 additions and 5 deletions.
  1. +3 −5 tw2/core/command.py
@@ -192,10 +192,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)
@@ -215,7 +213,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 02eec52

Please sign in to comment.