execute_ssh_command: Add traceback print to log.html
- When encountering an untolerated exception, debugging is much
easier with the addition of gp.lprintn(traceback.format_exc()).
This prints the original trace stack to the log.html file.
Change-Id: I2367a15edb3cc8321740fff4ad7f1bfc960731c5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index 2bd0742..7891059 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -6,6 +6,7 @@
"""
import sys
+import traceback
import re
import socket
import paramiko
@@ -328,6 +329,7 @@
# We do not handle any other RuntimeErrors so we will raise the
# exception again.
sshlib.close_all_connections()
+ gp.lprintn(traceback.format_exc())
raise(execute_exception)
# If we get to this point, the command was executed.