execute_ssh_command to handle ConnectionResetError
Change-Id: If0ea8770e627e0c91436287fd5dc93a19c380e21
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index 50f2b25..b936d61 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -306,7 +306,8 @@
if (except_type is paramiko.ssh_exception.SSHException
and re.match(r"SSH session not active", str(except_value))) or\
- (except_type is socket.error
+ ((except_type is socket.error
+ or except_type is ConnectionResetError)
and re.match(r"\[Errno 104\] Connection reset by peer",
str(except_value))) or\
(except_type is paramiko.ssh_exception.SSHException