@classmethod
    def parse_document_version(cls, document_version):
        try:
            for parser_class in cls._registry[document_version.mimetype]:
                try:
                    parser = parser_class()
                    parser.process_document_version(document_version)
                except ParserError:
                    # If parser raises error, try next parser in the list
                    pass
                else:
                    # If parser was successfull there is no need to try
                    # others in the list for this mimetype
                    return

            raise NoMIMETypeMatch('Parser MIME type list exhausted')
        except __HOLE__:
            raise NoMIMETypeMatch
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/ocr/parsers.py/Parser.parse_document_version