#NEWLINE# @ classmethod #NEWLINE# def _compute_hash( cls , names , stream_factory ) : #NEWLINE# #INDENT# digest = sha1 ( ) #NEWLINE# hashed_names = [ n . replace ( os . sep , '/' ) for n in stream_factory ] #NEWLINE# digest . update ( '' . join ( hashed_names ) . encode ( 'utf-8' ) ) #NEWLINE# for name in names : #NEWLINE# #INDENT# with contextlib . closing ( stream_factory ( name ) ) as fp : #NEWLINE# #INDENT# cls . update_hash ( fp , digest ) #NEWLINE# #UNINDENT# #UNINDENT# return digest . hexdigest ( )