mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	target: Ensure consistency between target.execute() and conn.execute()
Commit 511d478164 ("exceptions: Classify transient exceptions")
introduced a "will_succeed" argument in target.execute(). This argument
is then passed down to conn.execute(). However, since it is not
labelled, this argument happens to overwrite the "strip_colors" argument
of conn.execute because of its position in the list of parameters.
Fix this by labelling the parameters given to conn.execute(). While at
it, introduce a "strip_colors" parameters for target.execute() hence
keeping the APIs consistent.
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							809d987f84
						
					
				
				
					commit
					b9b38a20f6
				
			@@ -362,9 +362,10 @@ class Target(object):
 | 
				
			|||||||
    # execution
 | 
					    # execution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def execute(self, command, timeout=None, check_exit_code=True,
 | 
					    def execute(self, command, timeout=None, check_exit_code=True,
 | 
				
			||||||
                as_root=False, will_succeed=False):
 | 
					                as_root=False, strip_colors=True, will_succeed=False):
 | 
				
			||||||
        return self.conn.execute(command, timeout, check_exit_code, as_root,
 | 
					        return self.conn.execute(command, timeout=timeout,
 | 
				
			||||||
                will_succeed)
 | 
					                check_exit_code=check_exit_code, as_root=as_root,
 | 
				
			||||||
 | 
					                strip_colors=strip_colors, will_succeed=will_succeed)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def background(self, command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, as_root=False):
 | 
					    def background(self, command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, as_root=False):
 | 
				
			||||||
        return self.conn.background(command, stdout, stderr, as_root)
 | 
					        return self.conn.background(command, stdout, stderr, as_root)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user