mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	REFACTOR simplify out-of-bounds-check in control()
This commit is contained in:
		@@ -669,7 +669,7 @@ class Escpos(object):
 | 
			
		||||
        :raises: :py:exc:`~escpos.exceptions.TabPosError`
 | 
			
		||||
        """
 | 
			
		||||
        # Set tab positions
 | 
			
		||||
        if pos < 1 or pos > 16:
 | 
			
		||||
        if not (1 <= pos <= 16):
 | 
			
		||||
            raise TabPosError()
 | 
			
		||||
        else:
 | 
			
		||||
            self._raw(CTL_SET_HT + six.int2byte(pos))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user