<s> import yaml <EOL> import logging <EOL> logger = logging . getLogger ( __name__ ) <EOL> def read_yaml_config ( config_file ) : <EOL> config = None <EOL> try : <EOL> with open ( config_file , '<STR_LIT:r>' ) as stream : <EOL> config = yaml . load ( stream ) <EOL> except yaml . YAMLError as exc : <EOL> logger . error ( "<STR_LIT>" % ( config_file , exc ) ) <EOL> return config </s>
