def load_yaml(filename):
 try:
  with open(filename, 'r') as f:
   return yaml.load(f, Loader=Loader)
 except (IOError, yaml.error.YAMLError) as exc:
  raise ConfigReadError(filename, exc)

def load_yaml ( filename ) : try : with open ( filename , 'r' ) as f : return yaml . load ( f , Loader = Loader ) except ( IOError , yaml . error . YAMLError ) as exc : raise ConfigReadError ( filename , exc )
read a yaml document from a file .