mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	target: Fix Target.get_connection()'s busybox
The conncetion returned by Target.get_connection() does not have its .busybox attribute initialized. This is expected for the first connection, but connections created for new threads should have busybox set.
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							ef9384d161
						
					
				
				
					commit
					9bd76fd8af
				
			@@ -381,7 +381,10 @@ class Target(object):
 | 
				
			|||||||
    def get_connection(self, timeout=None):
 | 
					    def get_connection(self, timeout=None):
 | 
				
			||||||
        if self.conn_cls is None:
 | 
					        if self.conn_cls is None:
 | 
				
			||||||
            raise ValueError('Connection class not specified on Target creation.')
 | 
					            raise ValueError('Connection class not specified on Target creation.')
 | 
				
			||||||
        return self.conn_cls(timeout=timeout, **self.connection_settings)  # pylint: disable=not-callable
 | 
					        conn = self.conn_cls(timeout=timeout, **self.connection_settings)  # pylint: disable=not-callable
 | 
				
			||||||
 | 
					        # This allows forwarding the detected busybox for connections created in new threads.
 | 
				
			||||||
 | 
					        conn.busybox = self.busybox
 | 
				
			||||||
 | 
					        return conn
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def wait_boot_complete(self, timeout=10):
 | 
					    def wait_boot_complete(self, timeout=10):
 | 
				
			||||||
        raise NotImplementedError()
 | 
					        raise NotImplementedError()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user