def file_hash(load, fnd):
 if ('env' in load):
  salt.utils.warn_until('Oxygen', "Parameter 'env' has been detected in the argument list.  This parameter is no longer used and has been replaced by 'saltenv' as of Salt 2016.11.0.  This warning will be removed in Salt Oxygen.")
  load.pop('env')
 ret = {}
 if ('saltenv' not in load):
  return ret
 if (('path' not in fnd) or ('bucket' not in fnd) or (not fnd['path'])):
  return ret
 cached_file_path = _get_cached_file_name(fnd['bucket'], load['saltenv'], fnd['path'])
 if os.path.isfile(cached_file_path):
  ret['hsum'] = salt.utils.get_hash(cached_file_path)
  ret['hash_type'] = 'md5'
 return ret

def file_hash ( load , fnd ) : if ( 'env' in load ) : salt . utils . warn_until ( 'Oxygen' , "Parameter 'env' has been detected in the argument list.  This parameter is no longer used and has been replaced by 'saltenv' as of Salt 2016.11.0.  This warning will be removed in Salt Oxygen." ) load . pop ( 'env' ) ret = { } if ( 'saltenv' not in load ) : return ret if ( ( 'path' not in fnd ) or ( 'bucket' not in fnd ) or ( not fnd [ 'path' ] ) ) : return ret cached_file_path = _get_cached_file_name ( fnd [ 'bucket' ] , load [ 'saltenv' ] , fnd [ 'path' ] ) if os . path . isfile ( cached_file_path ) : ret [ 'hsum' ] = salt . utils . get_hash ( cached_file_path ) ret [ 'hash_type' ] = 'md5' return ret
return a file hash .