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'])
def handleAudio(self): if not IAudio.providedBy(self.content): alsoProvides(self.content, IAudio) self.object.reindexObject(idxs=['object_provides'])