#NEWLINE# def check_artifact_is_current( self , artifact_name , sources , config_hash ) : #NEWLINE# #INDENT# con = self . connect_to_database ( ) #NEWLINE# cur = con . cursor ( ) #NEWLINE# try : #NEWLINE# #INDENT# if ( config_hash != self . _get_artifact_config_hash ( cur , artifact_name ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if self . _any_sources_are_dirty ( cur , artifact_name ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for ( source_name , info ) in self . _iter_artifact_dependency_infos ( cur , artifact_name , sources ) : #NEWLINE# #INDENT# if ( info is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if isinstance ( info , VirtualSourceInfo ) : #NEWLINE# #INDENT# new_vinfo = self . get_virtual_source_info ( info . path ) #NEWLINE# if ( not info . unchanged ( new_vinfo ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( not info . unchanged ( self . get_file_info ( info . filename ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# con . close ( )