summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-03-02 13:11:07 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-03-02 13:11:07 +0100
commit97cefa0d20194a29354c65593d4ebeb86ab97387 (patch)
treedc8ad49d8efeaeabbbf98fba6aeaeefafd9dad20
parente5e11fe670f357a82c2eca8afe0a14ebc2349b36 (diff)
ssh_test: fix newlines in command output
-rwxr-xr-xkpov_util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kpov_util.py b/kpov_util.py
index d6bdef8..2ebc725 100755
--- a/kpov_util.py
+++ b/kpov_util.py
@@ -29,7 +29,7 @@ def ssh_test(host, user, password, commands=()):
s.sendline(command)
s.prompt()
if test:
- results[test] = s.before[len(command+'\r\n'):]
+ results[test] = s.before[len(command+'\r\n'):].strip().replace('\r\n', '\n')
s.logout()
except pexpect.exceptions.EOF as e:
results['ssh'] = 'connection to {} as {}/{} failed (EOF)'.format(host, user, password)