#NEWLINE# def ingest( self , meta , local_path ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# pdf_path = image_to_pdf ( local_path ) #NEWLINE# if ( ( pdf_path is None ) or ( not os . path . isfile ( pdf_path ) ) ) : #NEWLINE# #INDENT# self . log_error ( meta , error_type = 'ImageConvertError' , error_message = ( 'Could not convert image: %r' % meta ) ) #NEWLINE# return #NEWLINE# #UNINDENT# self . store_pdf ( meta , pdf_path ) #NEWLINE# self . extract_pdf ( meta , pdf_path ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# if os . path . isfile ( pdf_path ) : #NEWLINE# #INDENT# os . unlink ( pdf_path )