Change error to handle strings and files instead of list
This commit is contained in:
parent
3ec00ae16e
commit
9b40c0860f
|
@ -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')
|
||||||
|
|
Loading…
Reference in New Issue