Skip to content

Commit

Permalink
we cannot anymore use directives inside directive implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
janwijbrand committed Nov 1, 2010
1 parent 9eb45bf commit fc391ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/grokcore/site/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def factory(self, factory, provides=None, name=u'',
"provides argument of %s." % self.name)

if provides is None:
provides = grokcore.component.provides.bind().get(factory)
# We cannot bind the provides directive and get information
# from the factory, so we do it "manually" as we know how
# to get to the information.
dotted = grokcore.component.provides.dotted_name()
provides = getattr(factory, dotted, None)

if provides is None:
if util.check_subclass(factory, LocalUtility):
Expand Down

0 comments on commit fc391ca

Please sign in to comment.