Example #1
0
 def remove_file(self, fileobj):
     '''removes a file entry from the db, which means removing:
         - all search references,
         - all dictionary words which were orphaned by this,
         - the reference in the files table.'''
     try:
         dead_wordids = self.remove_from_search(fileobj.uid)
         self.remove_all_from_dictionary(dead_wordids)
         self.remove_from_files(fileobj.uid)
     except Exception as exception:
         log.ex(exception)
         log.e(_('error removing entry for %s'), fileobj.relpath)
         raise exception
Example #2
0
 def remove_file(self, fileobj):
     '''removes a file entry from the db, which means removing:
         - all search references,
         - all dictionary words which were orphaned by this,
         - the reference in the files table.'''
     try:
         dead_wordids = self.remove_from_search(fileobj.uid)
         self.remove_all_from_dictionary(dead_wordids)
         self.remove_from_files(fileobj.uid)
     except Exception as exception:
         log.ex(exception)
         log.e(_('error removing entry for %s'), fileobj.relpath)
         raise exception