예제 #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
파일: FileCorpus.py 프로젝트: ArildF/rogie
    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
파일: FileCorpus.py 프로젝트: ArildF/rogie
    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)