Avoid print keyword for python2, in command rprint method
				
					
				
			This commit is contained in:
		
							parent
							
								
									ca03485cf8
								
							
						
					
					
						commit
						645259da20
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
################################################################################
 | 
			
		||||
#
 | 
			
		||||
#  Rattail -- Retail Software Framework
 | 
			
		||||
#  Copyright © 2010-2022 Lance Edgar
 | 
			
		||||
#  Copyright © 2010-2023 Lance Edgar
 | 
			
		||||
#
 | 
			
		||||
#  This file is part of Rattail.
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -465,8 +465,10 @@ class Subcommand(object):
 | 
			
		|||
    def rprint(self, *args, **kwargs):
 | 
			
		||||
        self.require_rich()
 | 
			
		||||
 | 
			
		||||
        from rich import print as rprint
 | 
			
		||||
 | 
			
		||||
        # TODO: this could look different once python2 is out of the
 | 
			
		||||
        # picture; but must avoid `print` keyword for python2
 | 
			
		||||
        import rich
 | 
			
		||||
        rprint = getattr(rich, 'print')
 | 
			
		||||
        return rprint(*args, **kwargs)
 | 
			
		||||
 | 
			
		||||
    def basic_prompt(self, info, default=None, is_password=False, is_bool=False,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue