source: products/quintagroup.pingtool/trunk/quintagroup/pingtool/subscribers.py @ 3665

Last change on this file since 3665 was 626, checked in by crchemist, 18 years ago

Modified tests.

File size: 689 bytes
Line 
1from zope.interface import alsoProvides, noLongerProvides
2from zope.component import getUtility
3
4from interfaces import ISyndicationObject
5
6try:
7    from vice.outbound.interfaces import IFeedConfigs
8    success = True
9except ImportError:
10    success = False
11
12def mark_syndication(object, event):
13    if hasattr(object.aq_base, 'syndication_information') or \
14               (success and IFeedConfigs(object.aq_base, None)) and IFeedConfigs(object.aq_base).enabled:
15        if not ISyndicationObject.providedBy(object):
16            alsoProvides(object, ISyndicationObject)
17    else:
18        if ISyndicationObject.providedBy(object):
19            noLongerProvides(object, ISyndicationObject)
Note: See TracBrowser for help on using the repository browser.