def get_config(config, default_config):
if not config:<EOL><INDENT>logging.warning('<STR_LIT>', default_config)<EOL>config = default_config<EOL><DEDENT>try:<EOL><INDENT>with open(config, '<STR_LIT:r>') as config_file:<EOL><INDENT>return yaml.load(config_file)<EOL><DEDENT><DEDENT>except (yaml.reader.ReaderError,<EOL>yaml.parser.ParserError,<EOL>yaml.scanner.ScannerError) as e:<EOL><INDENT>raise ConfigError('<STR_LIT>' % str(e))<EOL><DEDENT>
Load configuration from file if in config, else use default