From 9b40c0860f4943d6fe273a5e4de3d784f5dd3836 Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Wed, 16 Mar 2016 13:29:22 -0700 Subject: [PATCH] Change error to handle strings and files instead of list --- escpos/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/escpos/config.py b/escpos/config.py index bf6e4cb..2eed0bb 100644 --- a/escpos/config.py +++ b/escpos/config.py @@ -49,8 +49,8 @@ class Config(object): with open(config_path, 'rb') as f: config = yaml.safe_load(f) except EnvironmentError as e: - raise exceptions.ConfigNotFoundError('Couldn\'t read config at one or more of {config_path}'.format( - config_path="\n".join(config_path), + raise exceptions.ConfigNotFoundError('Couldn\'t read config at {config_path}'.format( + config_path=str(config_path), )) except yaml.YAMLError as e: raise exceptions.ConfigSyntaxError('Error parsing YAML')