mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
ssh: increase terminal size to avoid issues with echoed command parsing
By default the terminal emulated by pxssh is 24x80 in size, which force the addition of unwanted "\r" in long commands. These \r are painful to parse and remove from the echoed command. This patch tries to alleviate this issue by setting a bigger TTY terminal by default. A 200 columns display should be big enough to execute most of the commands. In case longer commands are required it is better have them on a script to push on the target for execution. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
parent
db14589886
commit
5d288efa9c
@ -57,6 +57,9 @@ def ssh_get_shell(host, username, password=None, keyfile=None, port=None, timeou
|
||||
conn.login(host, username, password, port=port, login_timeout=timeout)
|
||||
except EOF:
|
||||
raise TargetError('Could not connect to {}; is the host name correct?'.format(host))
|
||||
conn.setwinsize(500,200)
|
||||
conn.sendline('')
|
||||
conn.prompt()
|
||||
return conn
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user