示例#1
0
def remove_marker(object):
    changed = False
    if IAudio.providedBy(object):
        noLongerProvides(object, IAudio)
        changed = True
    if IVideo.providedBy(object):
        noLongerProvides(object, IVideo)
        changed = True
    if changed:
        object.reindexObject(idxs=['object_provides'])
示例#2
0
 def handleAudio(self):
     if not IAudio.providedBy(self.content):
         alsoProvides(self.content, IAudio)
         self.object.reindexObject(idxs=['object_provides'])