Skip to content

Commit

Permalink
Merge pull request #6 from zopefoundation/simplify-notify
Browse files Browse the repository at this point in the history
Simplify intIdEventNotify to use handle
  • Loading branch information
jamadden committed Dec 3, 2016
2 parents ec5e70c + fd914b9 commit 5f315ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/zope/intid/__init__.py
Expand Up @@ -22,7 +22,7 @@

import BTrees
from persistent import Persistent
from zope.component import adapter, getAllUtilitiesRegisteredFor, subscribers
from zope.component import adapter, getAllUtilitiesRegisteredFor, handle
from zope.event import notify
from zope.interface import implementer
from zope.keyreference.interfaces import IKeyReference, NotYet
Expand Down Expand Up @@ -177,6 +177,4 @@ def addIntIdSubscriber(ob, event):
@adapter(IIntIdEvent)
def intIdEventNotify(event):
"""Event subscriber to dispatch IntIdEvent to interested adapters."""
adapters = subscribers((event.object, event), None)
for adapter in adapters:
pass # getting them does the work
handle(event.object, event)

0 comments on commit 5f315ec

Please sign in to comment.