mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	Stop checking for file to be python2/3 compatible
This commit is contained in:
		
				
					committed by
					
						
						Davis Goglin
					
				
			
			
				
	
			
			
			
						parent
						
							8e44c5126e
						
					
				
				
					commit
					5ba751d89b
				
			@@ -43,11 +43,11 @@ class Config(object):
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            if isinstance(config_path, file):
 | 
			
		||||
                config = yaml.safe_load(config_path)
 | 
			
		||||
            else:
 | 
			
		||||
            if isinstance(config_path, str):
 | 
			
		||||
                with open(config_path, 'rb') as f:
 | 
			
		||||
                    config = yaml.safe_load(f)
 | 
			
		||||
            else:
 | 
			
		||||
                config = yaml.safe_load(config_path)
 | 
			
		||||
        except EnvironmentError:
 | 
			
		||||
            raise exceptions.ConfigNotFoundError('Couldn\'t read config at {config_path}'.format(
 | 
			
		||||
                config_path=str(config_path),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user