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