def _open_yaml_file(file_str):
 with file_str.open(mode='r') as file:
  try:
   yaml_file = yaml.load(file)
   return yaml_file
  except yaml.YAMLError as exc:
   LOGGER.error(('error in configuration file: %s' % str(exc)))
   sys.exit(1)

def _open_yaml_file ( file_str ) : with file_str . open ( mode = 'r' ) as file : try : yaml_file = yaml . load ( file ) return yaml_file except yaml . YAMLError as exc : LOGGER . error ( ( 'error in configuration file: %s' % str ( exc ) ) ) sys . exit ( 1 )
opens yaml file .