mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 16:01:20 +00:00 
			
		
		
		
	ssh: Improve error when failing to push file
CalledProcessError doesn't include the output of the failed command in the message it prints, so use a HostError isntead.
This commit is contained in:
		@@ -292,7 +292,8 @@ class SshConnection(object):
 | 
			
		||||
        try:
 | 
			
		||||
            check_output(command, timeout=timeout, shell=True)
 | 
			
		||||
        except subprocess.CalledProcessError as e:
 | 
			
		||||
            raise subprocess.CalledProcessError(e.returncode, command_redacted e.output)
 | 
			
		||||
            raise HostError("Failed to copy file with '{}'. Output:\n{}".format(
 | 
			
		||||
                command_redacted, e.output))
 | 
			
		||||
        except TimeoutError as e:
 | 
			
		||||
            raise TimeoutError(command_redacted, e.output)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user