示例#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)
示例#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)
示例#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)
示例#4
0
    def removeMessage(self, message, observer_flags=0):
        '''Remove a Message from this corpus'''
        if options["globals", "verbose"]:
            print 'removing', message.key(), 'from corpus'

        message.remove()

        # superclass processing *MUST* be done
        # perform superclass processing *LAST!*
        Corpus.Corpus.removeMessage(self, message, observer_flags)
示例#5
0
    def removeMessage(self, message):
        '''Remove a Message from this corpus'''
        if options["globals", "verbose"]:
            print 'removing',message.key(),'from corpus'

        message.remove()

        # superclass processing *MUST* be done
        # perform superclass processing *LAST!*
        Corpus.Corpus.removeMessage(self, message)
示例#6
0
 def removeMessage(self, message, observer_flags=0):

        '''Remove a Message from this corpus'''

        if options["globals", "verbose"]:

            print 'removing',message.key(),'from corpus'

        message.remove()

        Corpus.Corpus.removeMessage(self, message, observer_flags)