#NEWLINE# def hash_file( path , hashobj , conn = None ) : #NEWLINE# #INDENT# '\n    Get the hexdigest hash value of a file\n    ' #NEWLINE# if os . path . isdir ( path ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# with salt . utils . fopen ( path , 'r' ) as f : #NEWLINE# #INDENT# hashobj . update ( f . read ( ) ) #NEWLINE# return hashobj . hexdigest ( )