def _hash_file(path):
 if (not os.path.isfile(path)):
  return False
 return hashlib.sha1(open(path, 'rb').read()).hexdigest()

def _hash_file ( path ) : if ( not os . path . isfile ( path ) ) : return False return hashlib . sha1 ( open ( path , 'rb' ) . read ( ) ) . hexdigest ( )
returns a hashdigest of path .