Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
f1cf50e6
Commit
f1cf50e6
authored
Jun 12, 2013
by
Ilias Tsitsimpis
Browse files
burnin: When raising AssertionError give more details
parent
b0488b65
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-tools/synnefo_tools/burnin.py
View file @
f1cf50e6
...
...
@@ -104,12 +104,12 @@ def _ssh_execute(hostip, username, password, command):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
ssh
.
connect
(
hostip
,
username
=
username
,
password
=
password
)
except
socket
.
error
:
raise
AssertionError
except
socket
.
error
,
err
:
raise
AssertionError
(
err
)
try
:
stdin
,
stdout
,
stderr
=
ssh
.
exec_command
(
command
)
except
paramiko
.
SSHException
:
raise
AssertionError
except
paramiko
.
SSHException
,
err
:
raise
AssertionError
(
err
)
status
=
stdout
.
channel
.
recv_exit_status
()
output
=
stdout
.
readlines
()
ssh
.
close
()
...
...
@@ -647,8 +647,8 @@ class SpawnServerTestCase(unittest.TestCase):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
connect
(
hostip
,
username
=
username
,
password
=
password
)
ssh
.
close
()
except
socket
.
error
:
raise
AssertionError
except
socket
.
error
,
err
:
raise
AssertionError
(
err
)
transport
=
paramiko
.
Transport
((
hostip
,
22
))
transport
.
connect
(
username
=
username
,
password
=
password
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment