execute_ssh_command: fix 'rc referenced before assignment' error
Change-Id: Ia7bd29f630fd4ccea2e414b9ce41bb811f584f88
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index af5e375..2bd0742 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -282,6 +282,11 @@
except_type, except_value, except_traceback = sys.exc_info()
gp.lprint_var(except_type)
gp.lprint_varx("except_value", str(except_value))
+ # This may be our last time through the retry loop, so setting
+ # return variables.
+ rc = 1
+ stderr = str(except_value)
+ stdout = ""
if except_type is exceptions.AssertionError and\
re.match(r"Connection not open", str(except_value)):