#NEWLINE# def get_file( self , repository , path , revision , base_commit_id , * args , **kwargs ) : #NEWLINE# #INDENT# 'Get a file from ReviewBoardGateway.\n\n        This will perform an API request to fetch the contents of a file.\n        ' #NEWLINE# url = self . _get_file_url ( repository , revision , base_commit_id , path ) #NEWLINE# try : #NEWLINE# #INDENT# ( data , is_new ) = self . _api_get ( url ) #NEWLINE# return data #NEWLINE# #UNINDENT# except ( HTTPError , URLError ) as e : #NEWLINE# #INDENT# if ( e . code == 404 ) : #NEWLINE# #INDENT# raise FileNotFoundError ( path , revision ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logging . warning ( 'Failed to get file from %s: %s' , url , e , exc_info = 1 ) #NEWLINE# raise SCMError ( six . text_type ( e ) )