Change error to handle strings and files instead of list

This commit is contained in:
Davis Goglin 2016-03-16 13:29:22 -07:00 committed by Davis Goglin
parent 3ec00ae16e
commit 9b40c0860f
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ class Config(object):
with open(config_path, 'rb') as f: with open(config_path, 'rb') as f:
config = yaml.safe_load(f) config = yaml.safe_load(f)
except EnvironmentError as e: except EnvironmentError as e:
raise exceptions.ConfigNotFoundError('Couldn\'t read config at one or more of {config_path}'.format( raise exceptions.ConfigNotFoundError('Couldn\'t read config at {config_path}'.format(
config_path="\n".join(config_path), config_path=str(config_path),
)) ))
except yaml.YAMLError as e: except yaml.YAMLError as e:
raise exceptions.ConfigSyntaxError('Error parsing YAML') raise exceptions.ConfigSyntaxError('Error parsing YAML')