mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Change error to handle strings and files instead of list
This commit is contained in:
		
				
					committed by
					
						
						Davis Goglin
					
				
			
			
				
	
			
			
			
						parent
						
							3ec00ae16e
						
					
				
				
					commit
					9b40c0860f
				
			@@ -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')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user