mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-03 23:41:21 +00:00 
			
		
		
		
	target/reset: Ignore all TargetErrors when rebooting
				
					
				
			Some targets can thrown stable errors in addition to transient errors when executing the `reboot` command. We expect this command to not always complete cleanly so ignore all target errors.
This commit is contained in:
		@@ -550,7 +550,7 @@ class Target(object):
 | 
			
		||||
    def reset(self):
 | 
			
		||||
        try:
 | 
			
		||||
            self.execute('reboot', as_root=self.needs_su, timeout=2)
 | 
			
		||||
        except (DevlibTransientError, subprocess.CalledProcessError):
 | 
			
		||||
        except (TargetError, subprocess.CalledProcessError):
 | 
			
		||||
            # on some targets "reboot" doesn't return gracefully
 | 
			
		||||
            pass
 | 
			
		||||
        self.conn.connected_as_root = None
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user