Esempio n. 1
0
 def addMessage(self, message, observer_flags=0):
     '''Add a Message to this corpus'''
     if not fnmatch.fnmatch(message.key(), self.filter):
         raise ValueError
     if options["globals", "verbose"]:
         print 'adding',message.key(),'to corpus'
     message.directory = self.directory
     message.store()
     Corpus.Corpus.addMessage(self, message, observer_flags)
Esempio n. 2
0
    def addMessage(self, message, observer_flags=0):
        '''Add a Message to this corpus'''
        if not fnmatch.fnmatch(message.key(), self.filter):
            raise ValueError

        if options["globals", "verbose"]:
            print 'adding', message.key(), 'to corpus'

        message.directory = self.directory
        message.store()
        # superclass processing *MUST* be done
        # perform superclass processing *LAST!*
        Corpus.Corpus.addMessage(self, message, observer_flags)
Esempio n. 3
0
    def addMessage(self, message):
        '''Add a Message to this corpus'''
        if not fnmatch.fnmatch(message.key(), self.filter):
            raise ValueError

        if options["globals", "verbose"]:
            print 'adding',message.key(),'to corpus'

        message.directory = self.directory
        message.store()
        # superclass processing *MUST* be done
        # perform superclass processing *LAST!*
        Corpus.Corpus.addMessage(self, message)