mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	filter for ValueError too in dpi logic
This commit is contained in:
		
				
					committed by
					
						
						Patrick Kanzler
					
				
			
			
				
	
			
			
			
						parent
						
							8f44ae7480
						
					
				
				
					commit
					90c89e66f0
				
			@@ -463,7 +463,7 @@ class Escpos(object):
 | 
			
		||||
        """Printer's DPI resolution."""
 | 
			
		||||
        try:
 | 
			
		||||
            dpi = int(self.profile.profile_data["media"]["dpi"])
 | 
			
		||||
        except (KeyError, TypeError):
 | 
			
		||||
        except (KeyError, TypeError, ValueError):
 | 
			
		||||
            # Calculate the printer's DPI from the width info of the profile.
 | 
			
		||||
            try:
 | 
			
		||||
                px = self.profile.profile_data["media"]["width"]["pixels"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user